Guest Posted May 22, 2020 Share Posted May 22, 2020 I am trying to find the correct CSS code to change the background color of my header from transparent to black only when I scroll. Has anyone had any success with adding CSS to accomplish this? Link to comment
Solution tuanphan Posted May 22, 2020 Solution Share Posted May 22, 2020 Each template needs different code. Can you share link to your site? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Guest Posted May 23, 2020 Share Posted May 23, 2020 Link: https://www.cruzthebeach.com/ Link to comment
tuanphan Posted May 31, 2020 Share Posted May 31, 2020 Add to Home > design > custom CSS .header-announcement-bar-wrapper.shrink { background: black !important; } this code can apply for all 7.1 sites. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
ekspohz Posted August 18, 2020 Share Posted August 18, 2020 On 5/31/2020 at 5:42 AM, tuanphan said: Add to Home > design > custom CSS .header-announcement-bar-wrapper.shrink { background: black !important; } this code can apply for all 7.1 sites. @tuanphan Is there a similar solution for 7.0 Brine sites? Link to comment
tuanphan Posted August 19, 2020 Share Posted August 19, 2020 18 hours ago, ekspohz said: @tuanphan Is there a similar solution for 7.0 Brine sites? Can you share link to your site? We can check easier. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
ekspohz Posted August 20, 2020 Share Posted August 20, 2020 14 hours ago, tuanphan said: Can you share link to your site? We can check easier. The solution here worked: Thanks. Link to comment
Guest Posted February 20, 2021 Share Posted February 20, 2021 Hi, I'm sorry if this question is stupid, I am completely confused by Squarespace's platform. Where exactly do we put this code? I'm putting it in Page Settings/Advanced and it's not changing my site at all. What I'm trying to desperately achieve is a different header/footer color for different pages/menu topics. So far I've learned this is only possible with a handful of templates on 7.0, but then you're stuck with that template AND Squarespace will charge me to go backward (so that's not a solution); and utterly impossible with the very flexible 7.1. Can anyone help? Link to comment
creedon Posted February 20, 2021 Share Posted February 20, 2021 @CompletelyConfused Please post the URL for the page where you installed the code on your site. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works. We can then take a look at your issue. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
tuanphan Posted February 22, 2021 Share Posted February 22, 2021 On 2/21/2021 at 2:29 AM, CompletelyConfused said: Hi, I'm sorry if this question is stupid, I am completely confused by Squarespace's platform. Where exactly do we put this code? I'm putting it in Page Settings/Advanced and it's not changing my site at all. What I'm trying to desperately achieve is a different header/footer color for different pages/menu topics. So far I've learned this is only possible with a handful of templates on 7.0, but then you're stuck with that template AND Squarespace will charge me to go backward (so that's not a solution); and utterly impossible with the very flexible 7.1. Can anyone help? Can you share site url? We can help easier or try editing page where you want to change header color >> Add a Code Block (anywhere) > Paste this code <style> .header-announcement-bar-wrapper { background: black !important; } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Javdesign Posted April 27, 2023 Share Posted April 27, 2023 Can you replace the word black with a hex value? I tried it and t doesn't seem to do anything. Is there a way to customize the header background color change (other than black in this example)? Link to comment
tuanphan Posted April 29, 2023 Share Posted April 29, 2023 On 4/27/2023 at 10:46 PM, Javdesign said: Can you replace the word black with a hex value? I tried it and t doesn't seem to do anything. Is there a way to customize the header background color change (other than black in this example)? Use this <style> .header-announcement-bar-wrapper { background: #000 !important; } </style> or <style> .header-announcement-bar-wrapper { background: rgb(0,0,0) !important; } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment