Jump to content

SOLVED: How to have CSS exceptions

Go to solution Solved by rwp,

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;


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


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



Edited by HKers
Link to comment
  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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

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.