我有一个 div
页面,如下面的布局/截图所示:
密码在这里:
html,
body {
margin: 0;
padding: 0;
border: 0;
}
#B,
#C,
#D {
position: absolute;
}
#A {
top: 0;
width: 100%;
height: 35px;
background-color: #99CC00;
}
#B {
top: 35px;
width: 200px;
bottom: 35px;
background-color: #999999;
z-index: 100;
border: solid 4px #00CC00;
}
#B2 {
margin-top: -35px;
bottom: 0;
background-color: #FFFFFF;
width: 200px;
overflow: scroll;
}
#B1 {
height: 35px;
width: 35px;
margin-left: 200px;
background-color: #CC0066;
}
#C {
top: 35px;
left: 200px;
right: 0;
bottom: 35px;
background-color: #CCCCCC;
}
#D {
bottom: 0;
width: 100%;
height: 35px;
background-color: #3399FF;
}
<div id="container">
<div id="A">A</div>
<div id="B">
<div id="B1">B1</div>
<div id="B2">B2</div>
</div>
<div id="C">C</div>
<div id="D">D</div>
</div>
我想调整的 B2 div
的高度,以填补(或延伸到)整个 B div
(在图像中用绿色边界标记) ,不想跨越页脚 D div
。这里是一个工作小提琴 链接(更新)。我该怎么解决这个问题?