• Resolved martin67

    (@martin67)


    Hi,

    I need to change the color of the page background for just one single page in my site. Theme is Twenty Seventeen with (child) Advanced Twenty Seventeen Plugin.

    What is the CSS code and where do you put it?

    Many thanks. (I already tried everything I found on other posts)!

    Martin

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If you look at the <body> tag (by viewing page source), you’ll see each page has a unique class applied. You can use that to set target CSS for that page only.

    So, consider the page for displaying post number 1783

    .postid-1783 .site-content-contain { background-color: #ccc; } will change the background color for that one page.

    To add CSS:

    • If you are using WordPress 4.7, use the “Additional CSS” option in the customizer.
    • If your theme has a custom CSS option, use that to add the CSS.
    • If not, install the plugin Simple Custom CSS.

    Learn to use the Chrome Developer Tools to help you see and test changes to your CSS.

    Thread Starter martin67

    (@martin67)

    Thanks very much, with a little tweek, that works perfectly.
    This is what works for me (for page 139)

    .page-id-139 .site-content-contain { background-color: #ccc; }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change single page background color’ is closed to new replies.