.top{width:100%; height:50px;background:gray}
.main{width:100%; height:300px;background:red;position:relative}
.left{width:200px;height:300px;background:blue;position:absolute;top:0; left:0;}
.right{margin-left:210px;height:300px;background:green}
.foot{width:100%; height:50px;background:#369}
.main{width:100%; height:300px;background:red;position:relative}
.left{width:200px;height:300px;background:blue;position:absolute;top:0; left:0;}
.right{margin-left:210px;height:300px;background:green}
.foot{width:100%; height:50px;background:#369}
属性排成顺眼的方式就容易发现问题啦!
*{ margin:0; padding:0;}
.left{ width:200px; height:600px; background:#ccc; position:absolute; left:0; top:0}
.main{ height:600px; margin:0 310px 0 210px; background:#9CF}
.right{ width:300px; height:600px; background:#FCC; position:absolute; top:0;right:0;}
</style>
*{ margin:0; padding:0;}
.left{ width:200px; height:600px; background:#ccc; position:absolute; left:0; top:0}
.main{ height:600px; margin:0 310px 0 210px; background:#9CF}
.right{ width:300px; height:600px; background:#FCC; position:absolute; top:0;right:0;}
</style>
.top{width:100%;height:100px;background:gray;}
.main{height:500px;position:relative;}
.left{height:500px;width:200px;background:blue;float:left;}
.right{height:500px;background:green;position:absolute;margin-left:200px ;}
.foot{width:100%;height:30px;background:orange;}
.main{height:500px;position:relative;}
.left{height:500px;width:200px;background:blue;float:left;}
.right{height:500px;background:green;position:absolute;margin-left:200px ;}
.foot{width:100%;height:30px;background:orange;}