Archived topic
Change background color on a single page
7 replies · Started by kevin on August 23, 2020
Hey there,
I want to color the background of my homepage black without changing it on other pages.
I tried using the CSS class for the page ID but that didn't allow me to color the full page black but that only worked for the site-main class.
I'm sure I'm overseeing something simple, so my apologies if this should be clear.
Thanks for your help,
Kevin
Hi there,
you're CSS would look like this:
body.page-id-268 {
background-color: #000;
}
That ID is for your About page.
Thanks for the quick response, David!
I still see white stripes (spaces between blocks) on the homepage: https://ibb.co/jWF99Dy
Is the page you've linked where we can see the issue?
The page ID doesn't match.
Let me know :)
Leo, I tested this on my staging environment: http://stupendous-game.flywheelstaging.com/
I used the ID I got from the preview of the homepage.
Thank you!
Edit your CSS to this:
body.page-id-4610, body.page-id-4610.one-container .container {
background-color: #000000;
}
Amazing! It worked :).
Thanks, Leo.
No problem :)