Jump to content

SOLVED: How to have CSS exceptions

Recommended Posts

Site URL: http://www.wearehkers.com

Hello, I've injected a javascript and corresponding css to take active links black. I called the javascript selector .active-link and used the css code below:

.active-link {
  color: black !Important;
}

 

But there's one button in my header that I want to keep as an exception so that it doesn't go black when I'm on that page. I tried using the :not () code but it didn't seem to work. Does the :not () code work on squarespace? Below is what I've tried:

 

.active-link:not (.Header) {
  color: black !Important;
}

OR

.active-link:not (.Header-inner-top) {
  color: black !Important;
}

 

PS. This is on a template that is not live yet so my domain won't show what I'm talking about, here's a screenshot instead.

image.thumb.png.9d1d33b6b965a74f6446216e2e134b74.png

I don't want the subscribe button to go black as it is below

image.thumb.png.11b4e8f84fac9d18fcc47b9f4f976bb0.png

 

Link to comment
  • Replies 8
  • Views 1.3k
  • Created
  • Last Reply
18 minutes ago, rwp said:

Can you make the button visible on your page so I can check it out please.

It's on a different template and my current template doesn't have navigation links or buttons in the header so I'm not sure how make it visible without changing my live website 😕

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.