tags:

views:

210

answers:

2

I've currently got the #border div at 100% of the page height, but am trying to get the #container div to stretch to 100% inside #border. At the moment #container only stretches to fit the content inside it.

* {
    margin: 0;
}

html, body {
    height:100%;
    font-family: Georgia, Times, "Times New Roman", serif;
    font-size:13px;
    line-height:19px;
    color:#333333;
    background: #f5f1ec;
    text-align: left;
}

#border {
    background: #f5f1ec;
    border:solid 1px #FFFFFF; 
    width: 880px;
    margin: 40px auto 0;
    padding:10px;
    height: auto !important;
    min-height: 100%;
    height: 100%;
}

#container {
    background: #FFFFFF;
    padding: 10px 50px 0;
    height: 100%;
}
+1  A: 

Try #container{min-height:inherit;position:absolute;}

and add overflow:hidden; to #border.

edl
did you mean #container ?
Aaron Moodie
Sorry. You put #content in the description on top.
edl
hey edl, i meant content, as in the content ( which is a standard two column blog layout)
Aaron Moodie
+2  A: 

Solved:

#container {
    background: #FFFFFF;
    padding: 10px 50px 0;
    height: 100%;
    width:780px;
    position:absolute;
}
Starx
thanks Starx. Just completely stripped back what I was doing and this works great. Was trying to get a footer in there as well, and have the border stop before it, so might have to rework my layout. Thanks for your help though.
Aaron Moodie
Adding position absolute did cause the nested div to fill the full height, but it also caused it to fill MORE than the full height for me. Any idea why? I don't want scrollbars on pages that don't need them.
Jeremy Hicks
That is actually due to margin and padding of the body probably set them to `0` and if the problem follows try setting `overflow:hidden` in the body, it will solve it.
Starx