Jump to content

Having different hover color on each nav link

Recommended Posts

Add the following to your custom css after any other code that may be there. 

.Header-nav--primary .Header-nav-inner {
	a.Header-nav-item[href="/"]:hover {
		color: pink !important 
	}
	a.Header-nav-item[href="/about-jessica-1"]:hover {
		color: blue !important 
	}
	a.Header-nav-item[href="/services-1"]:hover {
		color: green !important 
	}
	a.Header-nav-item[href="/praise"]:hover {
		color: blue !important 
	}
	a.Header-nav-item[href="/portfolio"]:hover {
		color: blue !important 
	}
	a.Header-nav-item[href="/blog"]:hover {
		color: blue !important 
	}
	a.Header-nav-item[href="/contact"]:hover {
		color: blue !important 
	}
}

You should then change the color values to those you want.  NB. I've inserted named colours but you can get more shades using hex or rgb colours.

If you're looking for a Squarespace Developer, drop me a line. 

Link to comment
  • 2 years later...
On 2/8/2022 at 5:27 AM, ehesslen said:

I'm trying to make each hover color different on my site and this code isn't working for me. Wells template. Any advice would be super appreciated!

Edited to add, here's my site: https://myriadcreative.co/about

Use this CSS for Wells

nav#mainNavigation>ul>li:nth-child(1) a:hover {
    color: blue !important;
}
nav#mainNavigation>ul>li:nth-child(2) a:hover {
    color: red !important;
}
nav#mainNavigation>ul>li:nth-child(3) a:hover {
    color: green !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.