0
我有4分格的:CSS重叠div的
#centered {
position: absolute;
top: 50%;
left: 52%;
width: 500px;
height: 500px;
margin-top: -250px; /* Half the height */
margin-left: -250px; /* Half the width */
}
#container{
width:100%;
}
(左和右是在该容器中)
#left{
float:left;
width: 260px;
height: 600px;
}
#right{
float: right;
top: 50%;
width: 160px;
height: 600px;
}
中心的DIV总是在页面的中心,另外两个在两边。 使用
body { min-width:1150px; }
#centered和#right之间总是有空格。 但是当我缩小页面时,#center和#left之间没有空间, 导致重叠。我怎样才能做到这一点?
也给你的html代码 – 2013-04-09 13:38:31