#mainbody {
background:#FC0;
overflow:hidden;width:100%;
}
.left {
width:800px;
height:200px;
background:#000;
float:left;
}
.right {
width:140px;
height:500px;
background:#690;
float:right;margin-left:20px;
}
background:#FC0;
overflow:hidden;width:100%;
}
.left {
width:800px;
height:200px;
background:#000;
float:left;
}
.right {
width:140px;
height:500px;
background:#690;
float:right;margin-left:20px;
}
*{margin:0; padding:0;}
#wrap{width:970px; margin 0 auto;}
#mainbody{width:100%;position:relative; margin-top:15px;}
#left{float:left;width:110px; }
#mid{margin-left:123px;width:650px;border:1px solid #999;}
#right{position:absolute;background:red;top:0px;left:794px;border:1px solid #999;}
#wrap{width:970px; margin 0 auto;}
#mainbody{width:100%;position:relative; margin-top:15px;}
#left{float:left;width:110px; }
#mid{margin-left:123px;width:650px;border:1px solid #999;}
#right{position:absolute;background:red;top:0px;left:794px;border:1px solid #999;}
2016-12-05
#wrap{width:970px; margin:0 auto;}
#mainbody{position:relative; margin-top:15px;}
#left{float:left; border: 1px solid red;
margin-right:13px;
width:110px; }
#mid{ float:left;width:650px;border: 1px solid blue;}
#right{position:relative; top:0;border:1px solid green;margin-left:792px;}
</head>
#mainbody{position:relative; margin-top:15px;}
#left{float:left; border: 1px solid red;
margin-right:13px;
width:110px; }
#mid{ float:left;width:650px;border: 1px solid blue;}
#right{position:relative; top:0;border:1px solid green;margin-left:792px;}
</head>
2016-11-30
老师有一个地方说的不对,当设置浮动后,文档应该是脱离了文档流,而不是老师所说的仍保持在文档流中!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2016-11-30
为元素设置clear:both; or clear:left; or clear:right
设置width:100%(或固定宽度) +overflow:hidden;
设置width:100%(或固定宽度) +overflow:hidden;
2016-11-30