我需要在没有单独使用 CSS(没有 jQuery 或 JavaScript)的滚动条的情况下拉伸div.leftContent3
并直到浏览器窗口的末尾,并且以同样支持 IE7 的方式进行。div.bodyContent3
怎么做?
HTML:
<div class="parent">
<div class="leftPanel">
<div class="leftContent1">
Left Content1
</div>
<div class="leftContent2">
Left Content2
</div>
<div class="leftContent3">
Left Content3
</div>
</div>
<div class="bodyContent">
<div class="bodyContent1">
Body Content1
</div>
<div class="bodyContent2">
Body Content2
</div>
<div class="bodyContent3">
Body Content3
</div>
</div>
</div>
CSS:
* {
margin: 0;
padding: 0;
}
html, body, .parent {
height: 100%;
}
.parent {
margin: auto;
width: 1000px;
}
.leftPanel {
float: left;
width: 200px;
height: 100%;
}
.bodyContent {
float: left;
width: 800px;
height: 100%;
}
.leftContent1, .leftContent2, .leftContent3,
.bodyContent1, .bodyContent2, .bodyContent3 {
border-bottom: 1px solid #000000;
float: left;
width: 100%
}
.leftContent1 {
background-color: #cccccc;
height: 125px;
}
.leftContent2 {
background-color: #999999;
height: 150px;
}
.leftContent3 {
background-color: #ff0000;
height: inherit;
}
.bodyContent1 {
background-color: #fcfcfc;
height: 120px;
}
.bodyContent2 {
background-color: orange;
height: 80px;
}
.bodyContent3 {
background-color: #00ff00;
height: inherit;
}