Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] How to make a multicolumn div stretch?

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #31657
    RoyWest
    Member

    html:















    css:

    body {
    background-color:#333;
    }

    #wrapper {
    width: 1000px;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
    }

    #header {
    background-color: #444;
    height: 200px;
    }

    #menu {
    background-color: #222;
    height: 30px;
    }

    #leftbar {
    background-color: #666;
    float: left;
    height: 200px;
    width: 500px;
    }

    #rightbar {
    background-color: #666;
    float: right;
    height: 200px;
    width: 500px;
    }

    #topsidebar {
    background-color: #CCC;
    height: 100px;
    width: 500px;
    }

    #leftsidebar {
    background-color: #333;
    float: left;
    height: 100px;
    width: 250px;
    }

    #rightsidebar {
    background-color: #999;
    float: right;
    height: 100px;
    width: 250px;
    }

    #footer {
    background-color: #444;
    height: 50px;
    width: 1000px;
    }

    #clearid {
    clear: both;
    }

    If I put a large piece of text in de left content area, the text will overlap, and the box will maintain his size like it’s a bg image..

    What did I do wrong?

    #59930
    TheDoc
    Member

    Make sure the text that you are putting in has spaces in it. Any text like this:

    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

    Will break a box (as you can see!).

    #59730
    RoyWest
    Member

    i have inserted a piece of the lorem ipsum text in it.. but it won’t stretch down, the text just goes over the footer and further..

    #59732
    RoyWest
    Member
    #59722
    TheDoc
    Member

    Silly me, my apologies, should have looked at your code the first time. It’s because you’ve given it a set height. If you want the content to control the height of an element, you can’t set it in the CSS.

    #59659
    RoyWest
    Member

    YES!! :D
    It worked!

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.