Jump to content

Adaptive header on homepage only / solid header on all other pages ?

Go to solution Solved by Lesum,

Recommended Posts

Hello,

I'm new here!

I'd like to put an adaptive header on my homepage but leave the header in full on the other pages (as it is currently on the site, with a plain color and nothing else).

I've explored the other topics but couldn't get it to work...

Thank you very much for your help.

My site: https://weareatom.ch/

Link to comment
  • Replies 5
  • Views 328
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted (edited)
1 hour ago, Lesum said:

@sr9574 Hi! Can you provide more details on how you want the adaptive header styled? It would be helpful if you could share an example of exactly how you want it to look.

Hello Sam !

Thanks for your answer !

So, 

Here are 3 screenshots.

The 1st is the adaptive header, so it's transparent and matches the home page background.
Then, as soon as I scroll down, it becomes full with a solid color. (2nd screenshot).

And finally, the 3rd screenshot is on another page when I leave the adaptive color in the settings, my logo is white because it adapts to the background of the page, which is white.
So I'd like the header on side pages to remain solid and not adaptive.

I don't know if this is clearer for you?

Thank you very much for your help.

 

 

1.png

2.png

3.png

Edited by sr9574
Link to comment
  • Solution

@sr9574 You can add this code in Website > Pages > Website Tools > Custom CSS

body.homepage .header {
    background: transparent !important;
}

body.homepage .header.shrink {
    background: #1c1c1c !important;
}

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

Link to comment
9 hours ago, Lesum said:

@sr9574 You can add this code in Website > Pages > Website Tools > Custom CSS

body.homepage .header {
    background: transparent !important;
}

body.homepage .header.shrink {
    background: #1c1c1c !important;
}

It works perfectly!
Thanks a lot for your help.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.