.top{height:50px; background:gray;}
.main{height:400px;background:red;position:relative; }
.left{ width:200px; height:400px; background:blue;}
.right{height:400px;background:green;margin-left: 210px;position:absolute;}
.foot{ height:50px; background:orange;overflow:hidden;}
.main{height:400px;background:red;position:relative; }
.left{ width:200px; height:400px; background:blue;}
.right{height:400px;background:green;margin-left: 210px;position:absolute;}
.foot{ height:50px; background:orange;overflow:hidden;}
.top{width:100%;height:60px;background:gray;}
.main{width:100%;height:800px;background:red;}
.left{ width:200px;height:800px;background:blue;float:left;}
.right{width:60%;height:800px;background:green;float:right;}
.foot{width:100%;height:60px;background:orange;clear:both;}
ok
.main{width:100%;height:800px;background:red;}
.left{ width:200px;height:800px;background:blue;float:left;}
.right{width:60%;height:800px;background:green;float:right;}
.foot{width:100%;height:60px;background:orange;clear:both;}
ok
main部分的高度是靠left撑起来的
.top {width:100%; background:grey;height:200px;}
.main{background:red;position:relative;width:100%;}
.left{ background:blue;width:200px;height:700px}
.right{background:green;position:absolute; height:700px;margin:0 0 0 210px;width:100%;}
.foot{background:orange;clear:both;}
.top {width:100%; background:grey;height:200px;}
.main{background:red;position:relative;width:100%;}
.left{ background:blue;width:200px;height:700px}
.right{background:green;position:absolute; height:700px;margin:0 0 0 210px;width:100%;}
.foot{background:orange;clear:both;}
.main{width: 100%;height: 800px;position: relative;}
.left{width: 200px;height: 800px;margin-right: 10px;background:blue;position: absolute;left:0;top:0}
.right{height: 800px;background:green;margin-left: 210px;}
.foot{width: 100%;height: 200px;background:yellow;clear:both;}
.left{width: 200px;height: 800px;margin-right: 10px;background:blue;position: absolute;left:0;top:0}
.right{height: 800px;background:green;margin-left: 210px;}
.foot{width: 100%;height: 200px;background:yellow;clear:both;}
.top{width:100%;height:80px;background-color:gray;}
.main{width:100%;height:500px;background-color:red;}
.left{ width:200px;height:500px;background-color:blue;float:left;}
.right{height:500px;background-color:green;position:absolute;left:210px;right:0px;}
.main{width:100%;height:500px;background-color:red;}
.left{ width:200px;height:500px;background-color:blue;float:left;}
.right{height:500px;background-color:green;position:absolute;left:210px;right:0px;}
.top{height:80px; width:500px; background:#ccc;}
.main{height:300px; width:500px;background:#f00;}
.left{height:300px; width:130px;background:#00f;float:left;}
.right{height:300px; width:360px;background:#9c9;float:right;}
.foot{height:40px; width:500px; background:#f63;}
.main{height:300px; width:500px;background:#f00;}
.left{height:300px; width:130px;background:#00f;float:left;}
.right{height:300px; width:360px;background:#9c9;float:right;}
.foot{height:40px; width:500px; background:#f63;}
用代码 position:absolute; 替换【任务1】
用代码 margin:0 310px 0 210px; 替换【任务2】
用代码 right:0;top:0; 替换【任务3】
用代码 margin:0 310px 0 210px; 替换【任务2】
用代码 right:0;top:0; 替换【任务3】
.head,.main{ width:960px; margin:0 auto}
.left{ width:220px; height:600px; background:#ccc; float:left}
.r_sub_right{ width:200px; height:600px; background:#9FC; float:right}
.footer{ height:50px; background:#9F9; clear:both}
.left{ width:220px; height:600px; background:#ccc; float:left}
.r_sub_right{ width:200px; height:600px; background:#9FC; float:right}
.footer{ height:50px; background:#9F9; clear:both}