Jump to content

Hudson: How can I change the background color on one page?

Go to solution Solved by jgennick,

Recommended Posts

How can I change the site background and cavas color for my information page without changing the color of my other pages?

Edited by arising
Questionify, fix title
Link to comment
  • Solution

Changing the color on just one page is possible using a couple of CSS rules. Go to your one page, click the Settings button, then go to the Advanced tab. Enter the following into the Page Header Code Injection field:


<style>
 body {background-color: pink;}
 #canvas {background-color: pink;}
</style>

The first rule changes the entire page body. The content area has its own color setting though, so you must change that one separately. I’ve tried these rules on the demo site’s Read Me page, and they seem to do what you are after.

Possibly you might need to add !important after the color names, as in “…:pink !important;”. Try the above first. Add the !important if you need it.

It would be to your advantage to learn enough about CSS to personally understand what the above rules mean and how they work. That’s a shameless plug for my book, but it’s true too.

Jonathan Gennick, Author: Learn CSS for Squarespace

Link to comment
  • 4 months later...
  • 2 weeks later...

wow I spent hours and nothing worked but this actually worked. I just bought your e-book now because you helped me. I was about to pull my hair out. I am hoping to learn from it. I got a feeling this will be a good investment. I also have a feeling I will be working with a few squarespace sites in the future. Thanks again.

Link to comment
  • 2 months later...

Hi Jonathan – this is almost exactly what I need also. I'm working with the OM template and this changes the Site Background – how do I change the Canvas Background? I will have a look at your eBook also! Many thanks, Alex

Edited by Pocamuffin
Link to comment
  • 3 weeks later...

The Fulton template is better as a separate question, and it would help if you posted a link to the specific page you want to colorize. For regular pages though, the following seems to work:


#siteWrapper {background-color: green;}

And then you can target the footers with:


#preFooter {background-color: green;}
#footer {background-color: green;]

Index pages may require a different technique.

I had time for only a fast look while eating breakfast, and hope the above helps.

Edited by JonathanGennick
Link to comment
  • 1 year later...
  • 3 months later...
  • 3 weeks later...

Hi Jonathan, are you able to help with the background color of a page under an index? i have tried:


<style>
#editions {background-color: #f3f2ed;}
</style> 

under the Index > Settings > Advanced > page header code injection. But still no luck

Edited by Guest
Link to comment
  • 2 months later...
  • 4 years later...

Hello, 

I have tried the first rule and it worked for my individual product pages well - thank you. I am trying to do the same for my entire product catalogue page in just one shop only (rather than both of my shops). So rather than white in the background ( as per image attached), I want to use #FAE8D7.

I was also hoping to change the background from grey to #FAE8D7 in the individual product page (in the second image)

Can anyone help please? I am using  Version 7.0– Supply family (Supply template). 

thanks for any help you can offer.

Adele 

Screen Shot 2021-06-14 at 2.22.07 pm.png

Screen Shot 2021-06-14 at 2.24.28 pm.png

Link to comment
5 hours ago, AdeleM said:

Hello, 

I have tried the first rule and it worked for my individual product pages well - thank you. I am trying to do the same for my entire product catalogue page in just one shop only (rather than both of my shops). So rather than white in the background ( as per image attached), I want to use #FAE8D7.

I was also hoping to change the background from grey to #FAE8D7 in the individual product page (in the second image)

Can anyone help please? I am using  Version 7.0– Supply family (Supply template). 

thanks for any help you can offer.

Adele 

 

Can you share link to your site? We can check easier

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
9 hours ago, AdeleM said:

Thanks for your reply - I really appreciate it.

https://www.adelemacerceramics.com/wholesale-order

its password protected as it is for my wholesale orderers only.

password is 

fortheloveofpots

thanks for your help 🙂

Add to Design > Custom CSS

/* Wholesale orders background */
body#collection-609bb406dcee8d48c74585d0 main#main {
    background: Green !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!)

Link to comment
On 6/17/2021 at 7:35 PM, tuanphan said:

Add to Design > Custom CSS


/* Wholesale orders background */
body#collection-609bb406dcee8d48c74585d0 main#main {
    background: Green !important;
}

 

Thank you so much for your help... I posted about another section below as well please...

 

Link to comment
20 hours ago, AdeleM said:

OMG! thank you - it worked a treat...

what about this page... the grey that sits behind the image and text?

https://www.adelemacerceramics.com/wholesale-order/winter-speckletableware-drntt

Screen Shot 2021-06-20 at 8.10.43 pm.png

Use this code

body#item-609bb6f7e0872d5d0407e4c0 main#main {
    background: green;
}

 

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
  • 2 weeks later...
On 6/21/2021 at 5:09 PM, tuanphan said:

Use this code

body#item-609bb6f7e0872d5d0407e4c0 main#main {
    background: green;
}

Hmm, that didn't work 

 

Link to comment
  • 3 months later...
On 10/28/2021 at 12:05 AM, dovely said:

Hi @tuanphan we are running into a similar issue with our site where we are trying to add a color to the top part of the landing page with the logo and navigation. The link is below as well as the password. Any advice you have would be greatly appreciated. Thank you!

https://carillon-vibraphone-7w3k.squarespace.com/

Password: 3m!ily2021

You mean add background color for profile, contact...bar?

Something like this?

image.thumb.png.8e9b9632aff39cd5b8d9916de08d4f72.png

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

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.