8
2列div布局:固定宽度的右列,左侧流体
我的要求很简单:2列,其中正确的列具有固定的大小。不幸的是,无论是在stackoverflow上还是在Google中,我都找不到可行的解决方案。如果我在自己的上下文中实现,那么那里描述的每个解决方案都会失败。当前的解决方案是: div.container { position: fixed; float: left; top: 100px; width: 100%; clear: both; } #content { margin-right: 265px; } #right { float: right; width: 225px; margin-left: -225px; } #right, #content { height: 1%; /* fixed for IE, although doesn't seem to work */ padding: 20px; } <div class="container"> <div id="content"> …