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;}
]]>
<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.
]]>
<div class="post"</div>
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;
}
]]>