Jump to content

How to have css of Gradient only apply to one page

Recommended Posts

Hi I have applied custom gradient to all the pages, but I only want it in my home page title section, the code is 

.page-section:nth-child(1) .section-background {
 background: linear-gradient(45deg,#111111, #333333, #666666 , #777777,#444444, #111111);
}

what should I add to avoid it being apply to all pages? it looks like this

Screenshot 2024-07-01 at 3.59.03 PM.png

Screenshot 2024-07-01 at 3.59.12 PM.png

Screenshot 2024-07-01 at 3.59.19 PM.png

Screenshot 2024-07-01 at 3.59.27 PM.png

Link to comment
  • Replies 1
  • Views 189
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

You need to add a page collection id at the front of the code and this after nth-child(1): 

:not(.footer-sections)

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) 

 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.