这里是我的HTML:内的div必须100%的高度
<div id="container">
<div id="left-container">
</div>
<div id="right-container">
</div>
</div>
的容器是100%的高度(我使用Firebug检查它)。但#left_container
需要是100%也和它是不是!
下面是我的CSS和screenshot。黄色应该是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%;
}
我的眼睛抽搐在你使用单引号在你的HTML ...除了它可能只是我的批准过如何巧妙地在#outer CSS添加一个空格眨眼,这样两条线是完全相同的宽度。我很伤心。 –