Jump to content

How do you exclude a specific page from your Custom CSS rules

Go to solution Solved by tuanphan,

Recommended Posts

Posted

I have a custom background on all of my pages that I was able to generate using custom CSS, but I would like not to have that background on one of the pages on my website.  

Here is the code:

#page{
background-image:url(https://static1.squarespace.com/static/5e8153bfb44957431114ef44/t/649ca8eb65c764054e3a0785/1687988460154/Blue+Background.jpg);
background-size: cover}
.section-border{opacity:0!important}

 

Here is the collection ID for the page I want to exclude:

#collection-5e815582abb56b3bf61d9204

 

Any help would be greatly appreciated, thanks.

  • Replies 2
  • Views 666
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution
Posted

Change your code to this

body:not(#collection-5e815582abb56b3bf61d9204) #page {
  background-image:url(https://static1.squarespace.com/static/5e8153bfb44957431114ef44/t/649ca8eb65c764054e3a0785/1687988460154/Blue+Background.jpg);
  background-size: cover;
}
body:not(#collection-5e815582abb56b3bf61d9204) .section-border{
  opacity:0 !important;
}

 

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.