Jump to content

How to change the background colour of each individual page using Code Injection

Recommended Posts

Edit each page >> Add a Code Block >> paste this code

<style>
  header#header {background-color: red !important;}
</style>

then save & reload the site

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 1/22/2022 at 6:31 AM, PearlPort said:

Thanks for your help Tuanphan, 

The code worked great and was able to change the header, but is there a code that can change the whole page background?

Screen Shot 2022-01-21 at 23.31.00.png

For all individual products, or product in screenshot only?

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
21 hours ago, PearlPort said:

Individual products

 

Add this page to Shop Page Header

<style>
body.view-item header#header {background-color: red !important;}
  body.view-item .section-background {background-color: red !important;}
</style>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.