Jump to content

Trying to exclude a home page from custom CSS rules

Go to solution Solved by Ziggy,

Recommended Posts

I'm trying to exclude the home page from my custom CSS code below. Homepage ID is id="collection-6631478e09ce2971917c2e52Can anyone assist?

.header-nav-item--active a  {
    text-decoration: underline;
    color: #b21e14 !important;
    border-bottom: 1px solid #b21e14 !important;
    background-image: none !important;
}

Link to comment
  • Replies 2
  • Views 708
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

Try this:

body:not(#collection-6631478e09ce2971917c2e52) .header-nav-item--active a {
    text-decoration: underline;
    color: #b21e14 !important;
    border-bottom: 1px solid #b21e14 !important;
    background-image: none !important;
}

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.