div.container {
border: 1px solid #000000;
width:100%;
overflow: hidden;
}
定义
width:100%;在ie6就可清除浮动100%随便定 也就是给各宽度就可
定义 overflow: hidden;
firefox 下清除浮动
<html>
<head>
<style type="text/css">
div.left {
width: 45%;
float: left;
background-color:#0f0;
height:200px;
}
div.right {
width: 45%;
float: right;
background:#ff0;
height:300px;
}
div.container {
border: 1px solid #000000;
width:100%;
overflow: hidden;
}
div.footer{
background:#ff0;
height:90px;
margin-top:8px;
}
</style>
</head>
<body>
<div class="container">
<div style="clear:both">
<div class="left">今在PlanABC看到另外这种方法,特些记录下来。 </div>
<div class="right">今在PlanABC看到另外这种方法,特些记录下来。</div>
</div>
</div>
<div class="footer">footer</div>
</body>
</html>