我有两个div
<div id="uno">
text
</div>
<div id="due">
text
</div>
div#uno{
width:300px;
height: 100px;
border: 1px solid blue;
overflow:hidden;
}
div#due{
width:300px;
height: 200px;
border: 1px solid yellow;
overflow:scroll;
}
如何让div id =“due”的高度等于页面的剩余高度?
答案 0 :(得分:3)
确保您指定了HTML 4.01或XHTML 1.x或更高版本的doctype:
div#uno{
position:absolute;
width:300px;
height:100px;
top:0px;
border:1px solid blue;
overflow:hidden;
}
div#due{
position:absolute;
width:300px;
top:100px;
bottom:0px;
border:1px solid yellow;
overflow:scroll;
}