.top{height:100px; background:#ccc;}
.main{height:500px; background:#FF0000;position:relative;}
.left{ width:200px; height:500px; background:#0033CC;position:absolute;top:0;}
.right{height:500px; background:#99FFFF; margin-left:210px;}
.foot{height:50px; background:#FF6633;}
.main{height:500px; background:#FF0000;position:relative;}
.left{ width:200px; height:500px; background:#0033CC;position:absolute;top:0;}
.right{height:500px; background:#99FFFF; margin-left:210px;}
.foot{height:50px; background:#FF6633;}
.top{height:50px;background:black;}
.main{height:400px;background:red;}
.left{ width:200px;height:400px;background:blue;position:absolute;left:0;top:50px;}
.right{height:400px;background:green;margin:0 0 0 210px;}
.foot{height:30px;background:yellow;clear:both;}
.main{height:400px;background:red;}
.left{ width:200px;height:400px;background:blue;position:absolute;left:0;top:50px;}
.right{height:400px;background:green;margin:0 0 0 210px;}
.foot{height:30px;background:yellow;clear:both;}
.main{ height:400px; background:#FF6699; }
.left{ width:200px; height:400px; background:#FFFF00; float:left; position:absolute; }
.right{ height:400px; background:#CC3300; float:left; margin-left:210px; width:100%; }
.foot{ height:100px; background:#CCCCCC; clear:both; }
.left{ width:200px; height:400px; background:#FFFF00; float:left; position:absolute; }
.right{ height:400px; background:#CC3300; float:left; margin-left:210px; width:100%; }
.foot{ height:100px; background:#CCCCCC; clear:both; }
footer上面main里有四个div都用到了float,不占文档层,即浮动在最上面。footer如果不用清除层的话,会自动紧跟top层(此层没用到float)。故footer要用clear:both ,把浮动层都去掉,自己再另占一行。
.left{ height:600px; width:200px; position:absolute; top:0; background:#0066FF;}
.main{ height:600px; background:#FFCC00; margin:0px 310px 0px 210px;}
.right{ width:300px; height:600px; background:#CCCCCC; position:absolute; right:0; top:0}
.main{ height:600px; background:#FFCC00; margin:0px 310px 0px 210px;}
.right{ width:300px; height:600px; background:#CCCCCC; position:absolute; right:0; top:0}
.top{height:100px;background:#ccc;}
.main{height:600px;background:red}
.left{height:600px;width:200px;float:left;background:blue;position:absolute;}
.right{height:600px;;float:right;width:80%;;background:indigo;}
.foot{height:100px;background:orange}
.main{height:600px;background:red}
.left{height:600px;width:200px;float:left;background:blue;position:absolute;}
.right{height:600px;;float:right;width:80%;;background:indigo;}
.foot{height:100px;background:orange}
.top{height:30px;background-color:#ccc;}
.main{background:#fb0000;overflow:hidden;position:relative;}
.left{ width:200px;background-color:#0000fe;height:600px;position:absolute;top:0;left:0;}
.right{background-color:#ccc;height:600px;margin-left:210px;}
.foot{height:30px;background-color:#ff6634;}
.main{background:#fb0000;overflow:hidden;position:relative;}
.left{ width:200px;background-color:#0000fe;height:600px;position:absolute;top:0;left:0;}
.right{background-color:#ccc;height:600px;margin-left:210px;}
.foot{height:30px;background-color:#ff6634;}