我這裏有我的CSS代碼。我的問題是,當內容有很多東西時,它會調整它的高度大於導航的高度。我想要的是當這個浮動高度之一調整它包括另一個。CSS浮動高度自動調整
<div id="main">
<div id="navigation"></div>
<div id="content"></div>
<div id="footer"></div>
</div>
CSS代碼如下:
#main{
width: 960px;
height: 500px;
margin: auto;
}
#navigation{
float: left;
width: 200px;
background-color: #C7E1BA;
}
#content{
float: right;
width: 740px;
background-color: #F6E4CC;
padding: 10px;
}
#content, #navigation {
height: 100%;
}
#footer{
clear: both;
width: 960px;
height: 100px;
background-color: #628B61;
margin: auto;
}
這是一個很好的建議,但接下來的問題是#內容內容四溢。它重疊在我的腳註:( – Ikong