Results 1 to 4 of 4

Thread: Sidebar spanning height difficulties

  1. #1
    Join Date
    Aug 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sidebar spanning height difficulties

    Hey guys, I was wondering if you could enlighten me on the right way to do this.

    http://patch.cacrew.com

    On this CSS blog I'm designing for a friend, I'm trying to get the leafy sidebar to span the height of the content. My CSS for the property is:

    #sidebar {
    float: left;
    background: #589f45 url(images/sidebar.gif) repeat-y;
    height: 100%;
    width: 44px;
    }


    I have a feeling that the height: 100% property is causing the problem. When you look at the site, the sidebar repeats exactly one page-length and stops.

    The HTML markup for the page:

    <div id="sidebar"></div>
    <div id="header"></div>
    <div id="topbar"></div>
    <div id="blog">
    Test<br />...
    </div>
    <div id="footer"></div>


    All of the other IDs are floated left. Do you guys have any suggestions? Any help would be greatly appreciated. Thanks for looking!

  2. #2
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    I'm confused it looks fine to me.

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I have a feeling that the height: 100% property is causing the problem.
    100% means 100% of the containing element. 100% of the <body> element's height is the height of the browser viewport. You're looking for equal-height columns. There are a few methods of achieving this; the most popular is Faux Columns, which uses background images to fake the second column, but my favourite is PIE's equal columns method, which is a lot more flexible. Both have their advantages and disadvantages.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Aug 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Your second technique worked great, thanks a lot!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •