• I have tryied all css per post plugins.
    They just dont work.

    What am i doing wrong?
    I just want to change background color for specific post.

    I know i can ask in specific plugin support but the problem is for every css plugin.

    Code im using in those plugins.

    body{background:#7881CF!important;}
    html{background:#7881CF!important;}
    .post .content {background:#7881CF!important;}
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Look at the <body> tag on the post and you’ll see that each post/page has a body class applied. You can use that to target CSS for specific page/posts.

    Thread Starter autox420

    (@autox420)

    I check source code.
    It seems like every post has this.

    <div class="post"</div>

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I just want to change background color for specific post.

    So you need to know *which* post, right? Look at the <body> tag to get the post ID, and then use that for the CSS. For example, give a body line of

    <body class="home page-template-default page page-id-311 custom-background">

    the page’s body class is page-id-311 so to change the background on that page, I’d use the CSS

    .page-id-311 body {
        background: #123456;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘css per post doesnt work’ is closed to new replies.