Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

SOLVED: How to have CSS exceptions


HKers
Go to solution Solved by rwp,

Question

Posted (edited)

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

 

Edited by HKers
Link to post
  • Answers 8
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Popular Posts

.active-link:not(.Header .active-link){ Give that a go  

Posted Images

8 answers to this question

Recommended Posts

  • 0
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 post
  • 0
10 hours ago, rwp said:

.active-link:not(.Header .active-link){

Give that a go

 

Oh great thank you!!! It works!!!

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...