【发布时间】:2010-02-25 23:57:29
【问题描述】:
我正在尝试构建一个具有固定宽度 div 和旁边的液体宽度 div 的布局:
<div id="main" style="width:100%; height:500px; background-color: #ccc;">
<div id="right" style="float: right; width:100px; height:500px; background-color: red;">
</div>
<div id="left" style="float: right; width: auto; height:500px; background-color: orange;">
</div>
</div>
左边的 div 没有填满它的宽度,当右边的 div 不存在时,我也希望这个 div 填满整个主 div,我该怎么做?
【问题讨论】:
标签: css html width liquid-layout fixed-width