Site logo

Archived topic

particular page's background color

3 replies · Started by Dmitry Bychenko on July 4, 2016

Viewing posts 1–4 of 4

hi, guys

i need to change particular page's color.
this one:
https://www.dropbox.com/s/sm8lyuxplfw5de5/bckgr_color.jpg?dl=0

If you install Tom's plugin Simple CSS you get a window on every page/post under the window we use to put content.
I use this window to set up page width for a particular page.
this code:

.container.grid-container {
max-width: 900px;
}

To change page's background color i guess the code should be something like:

.page {
color: ffffff;
}

Guys, what code should be to change particular page's background color?

You can target that pages background using the page/post id class that WordPress automatically adds to every page/post

so you can do something like:



body.page-id-[YOUR POST ID]{
    background-color: red;
}

https://i.imgur.com/fyTUBRQ.png

It should work :-)

thanks, Roberto!

i use Simple CSS plugin, it has window for css on every page/post, so i dont really need to know page's id (which is not a problem to find its id).

finally i use this code:

body.page{
background-color: red;
}

dont know, if im right or wrong, but it works.
thanks!

This archived topic is closed to new replies.