Jump to content

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

Go to solution Solved by jgennick,

Recommended Posts

Posted (edited)

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
  • Solution
Posted

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

  • 4 months later...
  • 2 weeks later...
Posted

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.

  • 2 months later...
Posted (edited)

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
Posted

Every template requires different CSS rules. Some problems are easier to solve in one template than in another. Please post a link to your site, and I will try and take a look.

Posted

Maybe something like:


body {background-color: pink;}
div#canvas {background-color: pink;}

Put style tags around them and put them into the Page Header Code Injection field for the page you want to affect.

  • 3 weeks later...
Posted (edited)

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
  • 1 year later...
  • 3 months later...
Posted

THANK YOU! I was trying this out and adding the sitewrapper did the trick (colour underneath the gallery block.)

You're a true gentleman!

Many thanks,Matt

I'm a filmmaker. Ta da.

  • 3 weeks later...
Posted (edited)

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
  • 2 months later...
  • 4 years later...
Posted

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

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

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

Posted
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...

 

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

  • 2 weeks later...
Posted
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 

 

Posted

thanks again for your reply but I count get that code to work...hmm...

  • 3 months later...
Posted
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!)

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.