Background colour on single posts

Community Forums Forums General Discussion Background colour on single posts

This topic is: not resolved

Tagged: , , ,

This topic contains 5 replies, has 3 voices, and was last updated by  deejuk 2 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #69746


    Hi all

    Hope someone can help with this.

    I have been able to style up custom pages fine. And even added styling to a category no problem using the css

    .category-9 .site-container {
    background: blue;

    However I have read the wordpress codex and it states that the styling for the category should be inherited by the single posts in that category. But no.

    I have tried always. to change the .site-container element for a single post to no avail.

    Can anyone please help me resolve this .. I have tried it on another Genesis site of mine and it does the same thing…fails to inherit the category styling.



    Here’s a plugin that would probably make it easy to do what you want to do:

    If you don’t want to use a plugin, you would probably have to target each post individually by its ID, though you could list all IDs from a particular category together and set one CSS rule.

    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+



    Thank you for that I feared it would be a plugin or listing posts individually. It’s genesis I am using by the way



    For the record on this I am using Cobolt Dynamik to achieve this. You can set a label in Dynamik and then add CSS directly in a CSS hook. When you edit the post you can then select the label with the styling on and it applies it to just that post.

    It seems single posts don’t inherit the category styling for some reason, but this is a decent work around if you either have Dynamik or know conditional hooks etc.



    It’s not clean or recommended but you could simply put your CSS right into the content of the post (inline CSS).
    In the text editor put :
    <div style=”background-color:blue;”> your text </div>



    Thank you for the reply .. it does work thank you.

    Shame it simply won’t pick up the category styling but hey

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.