- This topic has 9 replies, 4 voices, and was last updated 5 years, 10 months ago by srimali senn.
-
AuthorPosts
-
April 27, 2016 at 10:21 am #189843Sarah
Hi Tom, I’ve been searching through the various threads on how to do this but the code I’ve found and tried is not doing the whole job and I’ve not got a clue how to find the class of the bit that needs changing – is there a tool you recommend?
The page in questions is the home page of http://nicolacairncross.com – my sister wants it to all be black background on that page only.
I added the code recommended on your post https://generatepress.com/forums/topic/using-various-backgroundcontent-colors/ as follows:
body.page-id-7802 {
background-color: #000000;
}
.page-id-7802 .inside-article {
background-color: #000000;
}Unfortunately there is still a white box. Is it a case of removing padding? Or changing the background of another element?
Please help!
Thanks,
Sarah πApril 27, 2016 at 10:40 am #189848TomLead DeveloperLead DeveloperI created a plugin that actually makes it a lot easier: https://wordpress.org/plugins/simple-css/
It adds a metabox to the edit page area itself called “Simple CSS”.
In there you can add CSS that applies to that page only.
So you would do:
.one-container .site-content { padding: 0; }
For that page only π
April 27, 2016 at 11:39 pm #189954SarahIt’s worked! Of course π Thank you Tom. That’s a brilliant plugin – am going to go take a look to see what other ones you’ve created.
April 28, 2016 at 9:16 am #190114TomLead DeveloperLead DeveloperGlad it worked π
June 2, 2018 at 6:11 am #590066srimali sennI used following css and changed the background color
body.page-id-320 {
background-color: #FFFFFF;
color: #000000;
}
.page-id-320 .inside-article {
background-color: #FFFFFF;
color: #000000;
}
There is still small issue if you go to the page there is a black margin on left, how can i get rid of, it only on this page. http://www.tokyo-global.co.jp/what-is-global-engineering/Pls help me, tia
June 2, 2018 at 6:14 am #590068DavidStaffCustomer SupportHi,
that is coming from the container color, which can be targeted like so
.page-id-320 .one-container .container
June 2, 2018 at 7:15 am #590107srimali sennI tried following it did not work
.page-id-320 .one-container .container{
background-color: #FFFFFF !important;}June 2, 2018 at 7:58 am #590203srimali sennI seperated it and added and it worked, thank you
.page-id-320 .one-container {
background-color:#ffffff;}.page-id-320 .container {
background-color:#ffffff;}June 2, 2018 at 8:25 am #590216DavidStaffCustomer SupportGlad to hear you got it resolved btw you can combine CSS selectors into one rule where they have the same properties:
body.page-id-320, .page-id-320 .inside-article { background-color: #FFFFFF; color: #000000; } .page-id-320 .one-container, .page-id-320 .container { background-color:#ffffff; }
June 2, 2018 at 8:26 am #590218srimali sennThank you very much
-
AuthorPosts
- You must be logged in to reply to this topic.