Archived topic
Body Background Color Issue
8 replies · Started by Sourabh on January 6, 2021
HI,
I want to design few pages (which includes the home page), and I am selecting body BG color as White (#FFFFFF) which I need for pages (snap attached in Private section), however, it's also affecting my post BG color which is looking odd (Refer 2nd URL)...
So I want to make the background color white for pages but not for the post (not for articles pages as it will look like merged everything).
Hope you understand what I am trying to say, Please guide how to do it.
Hi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know :)
Ok
Hi there,
you can use this CSS to set the Background color just for Pages:
.page {
background-color: #fff;
}
no, it will make all the pages BG white, I want for specific pages only (Like home, about, contact, etc)but not for where I am hanging posts list, etc ...
Simplest solution is to install the Simple CSS plugin:
https://en-gb.wordpress.org/plugins/simple-css/
In the post/page editor you will see a Simple CSS meta box, anything you add here will only apply to that page. And you would add this CSS to set its background to white:
body {
background-color: #fff;
}
Alternatively you would have to write page specific CSS eg.
page-id-36,
.page-id-38 {
background-color: #fff;
}
You home page ID is 36, your About is 38. You can get the ID from the post editor by checking the URL. Simply add more comma separated CSS selectors to that CSS rule.
okay, let me try, will update you.
You're welcome
Ok, Thanks David