CSS嵌套div高度100%

Aar*_*die 6 css

我现在已经将#border div设置为页面高度的100%,但我试图将#container div扩展到#border内部的100%.目前#container仅伸展以适应其中的内容.

* {
    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%;
}
Run Code Online (Sandbox Code Playgroud)

Sta*_*arx 5

解决了:

#container {
    background: #FFFFFF;
    padding: 10px 50px 0;
    height: 100%;
    width:780px;
    position:absolute;
}
Run Code Online (Sandbox Code Playgroud)