Archived topic
Change background color on only one page
3 replies · Started by Nele on June 26, 2019
Hi there,
I would like to change the background color on only one page of my website? is this possible, and how exactly :-)?
kind regards from Belgium
Nele
Hi there,
you would need some CSS that targets that specific page e.g
body.page-id-XXXX {
background-color: #ffffff;
}
Replace the XXXX with the ID of the page you want to target. You can find the ID by editing the page in the WP Editor and inspecting the URL.
So I tried this code on my page https://gettysburgconnection.org/support-our-businesses-february-is-i-love-local-month-in-adams-county/
body.page-id-50184 {
background-color: #FAE0FD;
}
I see the code on the page but the background color hasn't changed.
Thanks.
Hi there,
its a post - which uses a different class name - try this:
body.postid-50184 {
background-color: #FAE0FD;
}