WordPress.org

Support

Support » How-To and Troubleshooting » How do I put a border/divider between post and sidebar?

How do I put a border/divider between post and sidebar?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, just add a border-right css reference to the content for class or id.

    Not enough info?

    OK, add this to the very bottom of your style sheet:

    #content {border-right: 2px solid #000}

    This will add a border on right of posts that is 2 pixels wide, a full line (solid) and the color black.

    The width, line type and color can be whatever you want.

    http://www.w3schools.com/css/css_border.asp
    http://www.w3schools.com/css/tryit.asp?filename=trycss_border

    And here is the code to show such at last link:

    <!DOCTYPE html>
    <html>
    <head>
    <style>
    body
    {
    border-right:2px solid #000;
    }
    </style>
    </head>
    
    <body>
    <p>This is some text in a paragraph.</p>
    <p>This is some text in a paragraph.</p>
    <p>This is some text in a paragraph.</p>
    <p>This is some text in a paragraph.</p>
    </body>
    </html>

    In above, the CSS is applied to the HTML elemental ‘body’…it can be applied as a class or id to a div or HTML element such as p, div, page, body, etc or even a p in a div of the body of a page:

    page body div p myclass_or_id_added <===in order it’s seen on page.

    …these are defaults in all compliant browsers but any can have classes or id’s applied.

    #content is an id. (the # defined that)

    Thank you so much! This really taught me more about borders, its attributes and such. however, it did not give me the effect that I wanted really as the border starts off right after the post, as opposed to be placed in the space between the sidebar and post. Might be hard to explain. I’m gonna read some more and play around, I might resolve it in time.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I put a border/divider between post and sidebar?’ is closed to new replies.