Jump to content

custom background colour with #id selector not working

Recommended Posts

I would like this page [ https://www.barbaramacias.com/paros2020 ] to have a different background colour than the rest of the site [ https://www.barbaramacias.com/ ] . Because the template only allows for one colour, I thought I could solve it by adding custom CSS. The html element has an id and a class. When I change the background colour in Chrome Inspector, it works but when I add the same line to the Custom CSS window in Squarespace, it does not work. I tried using these three versions of the CSS selector (just the id, id +class, tag+id+class) but none seem to work:
 

#yui_3_17_2_1_1578652083284_68 { background-color:#ffffff;}

#yui_3_17_2_1_1578652083284_68.Main.Main--page { background-color:#ffffff;}

main#yui_3_17_2_1_1578652083284_68.Main.Main--page { background-color:#ffffff;}

What am I missing? Thanks!

 

Link to comment
  • Replies 2
  • Views 1.3k
  • Created
  • Last Reply

#yui will change if you reload the plage

so don't use #yui

Use Page ID. See how to find Page ID.

If you use Business Plan or higher, remove the id, and wrap css in style and add to Page Header

<style>

css here

</style>

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!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

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