您可以稍微改变标记,最后用这一超文本:
<div id="container">
<div id="leftBar">
<div id="rightBar">
This is your rightBar
</div>
<p>Many paragraphs of text</p>
<p>Many paragraphs of text</p>
<p>Many paragraphs of text</p>
<p>Many paragraphs of text</p>
<p>Many paragraphs of text</p>
<p>Many paragraphs of text</p>
<p>Many paragraphs of text</p>
<p>Many paragraphs of text</p>
<p>Many paragraphs of text</p>
<p>Many paragraphs of text</p>
</div>
</div>
本中心:
#container {
width: 300px;
background-color: yellow;
overflow: hidden;
}
#leftBar {
position: relative;
width: 200px;
background-color: green;
padding-right: 100px;
}
#rightBar {
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 100px;
background-color: red;
*height: expression(document.getElementById( container ).offsetHeight); /*ie6 hack*/
}
这一工作应完全进行。 查阅。