Jump to content

How to change header text navigation on homepage only

Go to solution Solved by tuanphan,

Recommended Posts

Posted (edited)

Site URL: http://salhomestudio.com

URL: http://salhomestudio.com

Hey guys,

just having trouble to change the header text navigation color on homepage only. I tried this CSS but it doesn't change color:

.homepage .Header-nav-inner * {
    color: red !important;
}

I also tried this one but it changes only the menu color and the login color. Social media icons, cart icon and site title didn’t change:

 

I have managed to test some options out and found a working solution:

 

/*Change homepage nav-item color*/
.homepage
.header-nav-item a {
    color: white !important;
}
.homepage
.header-nav-item:hover a {
    color: white !important;
}
/* folder */
.homepage
.header-nav-folder-item:hover a {
    color: white !important;
}

 

Anyone who can help please?

Cheers.

 

Alberto

Schermata 2022-05-04 alle 3.29.39 PM.png

Edited by AlbertoA
Posted

Thanks very much! It does work but only with navigation menu. How can i change the title, social media and cart icons as well?

Really appreciate your help mate!

Schermata 2022-05-05 alle 9.55.22 AM.png

Posted
51 minutes ago, tuanphan said:

The code for SS 7.0 version, your site is 7.1. Use this code

body.homepage .header-nav-item a {
    color: white !important;
}

 

I've been able to do the site title but i can't do the social media and cart icons

Schermata 2022-05-05 alle 9.59.51 AM.png

  • Solution
Posted
On 5/5/2022 at 7:00 AM, AlbertoA said:

I've been able to do the site title but i can't do the social media and cart icons

Schermata 2022-05-05 alle 9.59.51 AM.png

Use this new code

body.homepage {
.header-nav-item a {
    color: white !important;
}
.header-actions svg {
    fill: white !important;
}
span.unauth {
    color: white;
}
svg.icon.icon--cart {
    stroke: white !important;
}
span.sqs-cart-quantity {
    color: white;
}}

 

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!)

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.