WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Twenty Eleven : Adding a border to the main page posts content (9 posts)

  1. Hazlo
    Member
    Posted 2 years ago #

    Hello there,

    I'm looking for something to add to my child theme css, in order to get a right border to the posts content, on my main page, a thin line starting under the menus, and down to the footer). It would also separate my right sidebar from the posts content. (I saw this for instance, in a theme called "Virtual Sightseeing" but couldn't figure out which code was used there).

    wp 3.2.1 / TwentyEleven child theme
    http://www.hazlotopics.com/blog/

    Thanks a lot for your help.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Try adding a right border to #content and then also adding in some padding to push the border away from the post text.

  3. Hazlo
    Member
    Posted 2 years ago #

    Hello Esmi,
    Thanks for your answer. I tried it but without success.
    Could you give me the precise code to add? (I'm not that good in programming languages!!)
    Many thanks, in advance.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    #content{
    border-right:1px solid #000;
    padding-right:20px;
    }

    CSS Tutorials
    Learning CSS

  5. Hazlo
    Member
    Posted 2 years ago #

    It works perfect! Thank you Esmi.
    thanks for the tutorials too. Makes me learn English at the same time!..
    From France... Best.

  6. Hazlo
    Member
    Posted 2 years ago #

    ... Well finally... another little question?... How could this border be displayed ONLY on the main page, not on single posts, neither on author pages?
    Thanks for your help, Esmi.

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    Try:

    body.home #content{
    border-right:1px solid #000;
    padding-right:20px;
    }
  8. Hazlo
    Member
    Posted 2 years ago #

    Great! that's exactly what I needed! Thanks again for involving here. And also for keeping on telling people to create child themes: I just upgraded twentyeleven and did NOT loose my customizations.....

  9. esmi
    Forum Moderator
    Posted 2 years ago #

    Cool :-)

Topic Closed

This topic has been closed to new replies.

About this Topic