0

I'm trying with no luck to change the background color of just one page. I've tried adding > and then using the selector

body.page-id-15 #content { background-color:#000000; }

This doesn't work. Seems the only way I can change the background to that page is changing the background of #content. But...that changes all pages. I know this is possible and I've done it before. But not with this theme

Any ideas? The link the page in question is here http://gregtregunno.ca/news Thanks

2 Answers 2

0

Looking at your pages source, it does not have post/page ID's being added to the page's body class so you referencing something in your CSS that doesn't exist.

Try this rather (not sure what section you want changed):

body.blog {
    background-color: red;
}

or

body.blog #content {
        background-color: red;
    }
0

You could put some conditional code in the header.php file that inserts a style into the header only for your specific page ID (15 in the example):

<head>
<?php if(is_page(15)): ?>

<style>
body.page {background-color: #FF0000 !important;}
</style>

<?php endif; ?>
</head>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.