WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Twenty Eleven Margins Sidebae (5 posts)

  1. Red1
    Member
    Posted 2 years ago #

    I wish to increase the width of the sidebar in 2011.
    I am at the stage of having decreased the margin of both content and secondary to 2.6% which is good for my layout.
    I think I now need to either decrease the margin between content and sidebar or maybe increase the size of the sidebar to achieve my goal, but these percentages keep screwing up the overall theme.
    Any help appreciated.
    I have looked at quite a few other posts on this subject but cannot get it right.

    PS: Why the change to % when pixels worked great for me?

    http://motoring-news.com to view current

  2. popper
    Member
    Posted 2 years ago #

    I tried increasing the width of #secondary to 22.8% in chrome's inspector and had no issues with the layout. What is the problem you're having?

  3. Red1
    Member
    Posted 2 years ago #

    I'm trying to close the gap between content and secondary. I can go to 22.8% put much more and the sidebar disappears to below the content.

  4. popper
    Member
    Posted 2 years ago #

    Play around with the values of the negative margin of #primary along with the percentage value of width in the #secondary. I tried:

    #primary {
      float: left;
      margin: 0 -35.4% 0 0;
      width: 100%;
    }
    
    #secondary {
      float: right;
      margin-right: 2.6%;
      width: 28.8%;
    }

    and it worked fine.

  5. Red1
    Member
    Posted 2 years ago #

    Thanks popper!
    Just couldn't get my head around which value affected which other.

Topic Closed

This topic has been closed to new replies.

About this Topic