.top{width:100%;height:100px;background:#ccc;}
.main{height:400px;background:red;}
.left{position:absolute;left:0;top:100px;width:200px;height:400px;background:blue;}
.right{margin-left:210px;height:400px;background:#3dc;}
.foot{width:100%;height:50px;background:orange;}
.main{height:400px;background:red;}
.left{position:absolute;left:0;top:100px;width:200px;height:400px;background:blue;}
.right{margin-left:210px;height:400px;background:#3dc;}
.foot{width:100%;height:50px;background:orange;}
z这里的代码我觉得footer div用margin600px 0 0 0 比较适合。height用main上head也会应用,虽然会被后面的覆盖,看着就不爽。
成功运行的部分代码如下:
div{text-align:lfet;}
.left{width:200px;height:500px;background-color:blue;float:left;}
.right{margin-left:201px;height:500px;background-color:#396;}
.foot{height:50px;background-color:#0hh;clear:both;}
<div class="left">left</div>
<div class="right">right</div>
div{text-align:lfet;}
.left{width:200px;height:500px;background-color:blue;float:left;}
.right{margin-left:201px;height:500px;background-color:#396;}
.foot{height:50px;background-color:#0hh;clear:both;}
<div class="left">left</div>
<div class="right">right</div>