这是我的HTML代码:
<div id="container">
<div id="left-container">
</div>
<div id="right-container">
</div>
</div>
容器的高度为100%(我用Firebug检查过)。但是
#left_container
也需要是100%,但它不是!以下是我的CSS和截图。黄色应该是100%。黄色是
#left-container
的背景。html, body {
height: 100%;
}
#container {
position:relative;
margin: 0 auto;
width: 100%;
height:100%;
height: auto !important;
min-height:100%;
background: #fff;
}
#left-container {
width: 300px;
background: #ff0;
height:100%;
height: auto !important;
min-height:100%;
}