• Hi,
    I have createad a different page from the home page and I need to set the background of the post to black.
    In the CSS I have:
    .ita-post-body
    {
    padding:10px;
    }
    which I have created
    .ita-post-body2
    {
    padding:10px;
    background-color: #000000;
    }
    to use in the new page, however, when I go to the new page (php file), I see that this is the part of the code that shows what I have post:

    while (have_posts()) {
    the_post();
    get_template_part('content', 'page');
    /* Display comments */
    if ( theme_get_option('theme_allow_comments')) {
    comments_template();
    }

    When I go to see the html source code, it generates:

    <div class="ita-box ita-post post-10 page type-page status-publish hentry" id="post-10">
    	    <div class="ita-box-body ita-post-body">
    	            <div class="ita-post-inner ita-article">
    	            	                <div class="ita-postcontent">
    	                    <!-- article-content -->
    	                    <p>HERE'S WHERE MY POST SHOWS UP</p>
    	                    <!-- /article-content -->

    As you can see, the ita-post-body is on the div, where can I find that so so I can set the backgrond color to black for that class.

    Thanks
    Regards

    [Moderator Note: Please post code or markup snippets between backticks or use the code button.]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Try using Firefox with the Firebug add-on for this kind of CSS work.
    http://getfirebug.com/

    use the css id of the next outer div: #post-10

    for instance, style:

    #post-10 .ita-post-body { }

    Thread Starter fufimaki

    (@fufimaki)

    esmi, I use firebug and it shows me the ita-box-body ita-post-body.

    alchymyth, I have done what you said and it worked succesfully.

    I have one more question, so on this page no matter if I delete the content UPDATE and then add a new content, the id of the post will always be 10 or should I be aware of the change?

    Thanks you to both of you
    Regards

    as long as you don’t trash the post/page, the ID should remain the same.

    Thread Starter fufimaki

    (@fufimaki)

    Great, once again, thanks a lot.

    Best Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Post background color’ is closed to new replies.