Jump to content

Changing the background colour of one page on my website

Recommended Posts

Hi,

I have been trying to change the background colour of a single page on my website to yellow. I have used the page header code injection in the advanced page settings to add CSS to the page to change the background colour, however, it's still got a white background.

The code I added is below:

<style>
.Header--top {
  background: yellow;
}
.Main {
  background: yellow;
}
.Footer {
  background: yellow;
}
</style>

I think there might be an error in the CSS. I'm not a coder and I used a website to generate this code.

If anyone knows where I am going wrong, it would be great to know to change the colour.

Thanks

Link to comment
3 hours ago, RedTrainBlog said:

Hi,

I have been trying to change the background colour of a single page on my website to yellow. I have used the page header code injection in the advanced page settings to add CSS to the page to change the background colour, however, it's still got a white background.

The code I added is below:

<style>
.Header--top {
  background: yellow;
}
.Main {
  background: yellow;
}
.Footer {
  background: yellow;
}
</style>

I think there might be an error in the CSS. I'm not a coder and I used a website to generate this code.

If anyone knows where I am going wrong, it would be great to know to change the colour.

Thanks

What is your site url, seems like the color has been covered by other element

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
48 minutes ago, RedTrainBlog said:

Thanks for getting back to me. The URL of the page I am trying to make yellow is:

http://www.redtrainblog.com/home

I'm not sure what you mean by "the color has been covered by other element" can you explain more?

Thanks

Alastair

Try

<script>
	#site {
        background: red;
    }
</script>

Add it to individual page code injection, there is a gear icon on Pages item, click Advanced on the popup

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

@RedTrainBlog If you use Personal Plan, add this to Design > Custom CSS

body#collection-576ad46c893fc053dd0c0a9c #site {
    background: green;
}

Also, your home page has very long content. You should consider adding a back to top button.

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.