Jump to content

Changing gradient fill for homepage section header background, keep solid white fill for rest of pages

Go to solution Solved by visualcreative,

Recommended Posts

Hi,

I've seen similar posts for this and have tried chat GPT.

Is there a way to create a gradient fill for my homepage background section header and keep a white solid fill for all other page headers?

The URL slug is /home, I'm not sure if my problem has been not inputting the correct page ID in CSS, if this could be done with just page settings- general, PAGE HEADER CODE INJECTION that would be great.

Thanks!

Alexander

Link to comment
  • 2 weeks later...
  • Solution

I have a related question. Does anyone know how to trigger a different header style for only some pages? i.e., default gradient style on most pages; solid on others.

I have two brands on one website; I have created a replacement navigation menu using Will Meyers Nav Replacement plug-in, and a second footer with hide globally / show locally logic.

I am using the gradient style for the main brand's nav (Brush Education https://brush-education.squarespace.com). I was able to revise the colour of the gradient for the second nav.

<style>
:root {
--gradientHeaderBackgroundColor: *insert gradient* !important;
}
</style>

 

Instead I want the second brand's nav to be SOLID.

Does anyone know how can I trigger this in CSS? I'd like to include it in the header code for each page that belongs to the second brand (Dog Training Press https://brush-education.squarespace.com/dtp-catalogue/p/retriever).

PW: brushview

Thanks!

 

Link to comment
On 5/31/2023 at 12:33 AM, visualcreative said:

I have a related question. Does anyone know how to trigger a different header style for only some pages? i.e., default gradient style on most pages; solid on others.

I have two brands on one website; I have created a replacement navigation menu using Will Meyers Nav Replacement plug-in, and a second footer with hide globally / show locally logic.

I am using the gradient style for the main brand's nav (Brush Education https://brush-education.squarespace.com). I was able to revise the colour of the gradient for the second nav.

<style>
:root {
--gradientHeaderBackgroundColor: *insert gradient* !important;
}
</style>

 

Instead I want the second brand's nav to be SOLID.

Does anyone know how can I trigger this in CSS? I'd like to include it in the header code for each page that belongs to the second brand (Dog Training Press https://brush-education.squarespace.com/dtp-catalogue/p/retriever).

PW: brushview

Thanks!

 

 Add this code to Page Header to remove gradient and add solid background

<style>
.header-background-gradient {
    background-image: unset !important;
    background-color: #f1f !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
On 6/5/2023 at 4:42 AM, visualcreative said:

With the gradient turned off here, the nav folder dropdown now holds on to the original banner colour (blue, vs the solid red I have added to the Page Header code). I'm not seeing how to target that drop-down folder here. Help once more @tuanphan? Much gratitude in advance!

 

 

With folder, use this code

<style>
  .header-nav-folder-content {
    background-image: unset !important;
    background-color: #f1f !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

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.