【发布时间】:2012-02-20 05:15:39
【问题描述】:
我正在寻找的布局是左侧一列静态长度,右侧一列静态长度,中间列拉伸以适应剩余空间。因此,无论调整大小,左侧和右侧的列都应保持相同的大小。这些列中的每一列都是它自己的 div 元素,我将把代码放在下面。我怎样才能让它工作?问题是 iframe 不会拉伸以适应给定的剩余宽度。谢谢!
HTML:
<div id="LeftColumn"></div>
<iframe id="ifrm"></div>
<div id="RightColumn"></div>
CSS:
iframe#ifrm {
position: fixed;
top: 3px;
left: 210px;
right: 140px;
height: 98%;
}
div#LeftColumn {
padding: 3px;
position: fixed;
top: 3px;
left: 3px;
border: 1px solid #494949;
background-color: #EEEEEE;
width: 200px;
height: 97.5%;
}
div#RightColumn {
position: fixed;
right: 3px;
border: 1px solid #494949;
background-color: #EEEEEE;
width: 140px;
height: 98%;
}
【问题讨论】: