我目前在页面高度的100%获得了#border div,但我试图让#container div在#border内部伸展到100%。此刻,#container只能延伸以适应其中的内容。CSS嵌套div高度100%
* {
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%;
}
对不起你们,应在问题已经#container的,而不是#内容。 – 2010-05-29 02:08:42