我有三列布局问题。3列布局问题
问题:我已经为“left”和“right”div设置了“position:fixed”。当我重新调整窗口大小时,“右”div与“中心”div重叠。
我需要“右”div不应该与“center”div重叠。
这是可能的吗?
HTML:
<div id="master">
<div class="left-div">Lorem ipsum..</div>
<div class="center-div">Lorem ipsum..</div>
<div class="right-div">Lorem ipsum..</div>
</div>
CSS:
#master{
width:100%;
}
.left-div{
width:150px;
background:red;
height:500px;
position:fixed;
left:0;
top:0;
}
.center-div{
width:640px;
background:yellow;
height:500px;
margin-left:170px;
float:left;
}
.right-div{
width:300px;
background:green;
height:500px;
position:fixed;
right:0;
top:0;
}
想这样的小屏幕? http://jsbin.com/xepofaxa/1/edit –
只有这样。但我需要为“左”和“右”设置“位置:固定”。之后,当我调整窗口的“1024px”结果下面时,我需要水平滚动条。在这种情况下。 “正确”分区不应与“中心”分区重叠。这可能吗? –
你检查了我的答案吗? –