Want to put body of all posts into a box

  • Author
  • #831426


    I am a newbie trying to edit the twenty-eleven CSS so that the body of all my posts will appear in a box with black borders, padding, and its own background color. I don’t want this to be applied to pages. I’m familiar with html, so I thought that CSS editing would be simple. It seems to be me that’s simple, the few things that I’ve tried haven’t worked. I thought that
    <div id> =header”>

    <div id=”body content”>

    seemed good, but it didn’t work

    The blog I need help with is protect-the-arroyo.com.


    I looked at this post as an example: http://protect-the-arroyo.com/2012/02/19/1b-evolution-of-the-arroyo-the-last-100-years-transportation-eastern-city-death-syndrome-debating-arroyo-priorities/

    To make the post content have black borders and a different background color on single posts like the one linked above, try this:

    .singular .hentry {
    background: beige;
    border: 5px solid black;

    You might also add some padding for the meta data and previous/next links:

    .singular .entry-meta, .singular #nav-single {
    padding: 8px;


    Thank you, that is very helpful and gives me a foothold. When I make those changes, they appear in the home page but not in the posts. My goal is to have them apply to all posts, but not to static pages. Can you help me make the changes apply to posts but not pages, or not to all pages? At the moment, they apply to two pages- the initial home page and about me. I’m happy for them to remain there. They don’t appear on the other pages or the two posts. I’d prefer to leave them off the other two pages and apply similar but not identical changes to all posts.


    My goal is to have them apply to all posts, but not to static pages.

    This is what the changes I sent will do, the background color and border will appear on posts, but not static pages.

    Here is an example of a link to a post, where the background is beige and there is a large black border: http://protect-the-arroyo.com/2012/02/19/1b-evolution-of-the-arroyo-the-last-100-years-transportation-eastern-city-death-syndrome-debating-arroyo-priorities/http://cl.ly/EeV3

    Here is an example of a page which doesn’t have a colored background or a border: http://protect-the-arroyo.com/about/http://cl.ly/Edmg

    See http://en.support.wordpress.com/post-vs-page/

    Did you mean you wanted posts on the home page to have a background color and border while individual posts and pages do not have them?



    Thank you. I’m sorry to be so obtuse. Here’s what I’m thinking now:
    Can I put <p class=”histo”> “… ” with the</p> at the end of this file, whether page or post and
    <p class=”sport”> at the end of others leaving some pages without insertion of the <p class

    and adding to the bottom of the css sheet
    .histo {
    background-color: beige
    border: 5ps solid black
    padding: 5px

    and .sport {
    border 5px solid green
    padding 5 px

    pages that had no <p presumably don’t get the additional mark up
    must I include singular?
    Again, thank you


    I’m not sure I follow the first part. If I understand correctly, you want to wrap the entire contents of posts inside an HTML tag using a class of “sport”. I wouldn’t recommend doing that. The main reason is if you were to use the more tag to break up posts (or other things), the starting tag might cause some strange behavior to happen.

    For the last part of your question, no, you don’t have to include “.singular”.

The topic ‘Want to put body of all posts into a box’ is closed to new replies.