再次安利一发这个:http://www.cnblogs.com/iyangyuan/archive/2013/03/27/2983813.html
2016-02-09
*{margin:0; padding:0;}
#wrap{width:970px; margin:0 auto;}
#mainbody{position:relative; margin-top:15px;}
#left{border:1px solid #999;width:110px; }
#mid{position:absolute;top:0;left:125px;width:650px;border:1px solid #999;}
#right{position:absolute;top:0;left:790px;border:1px solid #999;}
#wrap{width:970px; margin:0 auto;}
#mainbody{position:relative; margin-top:15px;}
#left{border:1px solid #999;width:110px; }
#mid{position:absolute;top:0;left:125px;width:650px;border:1px solid #999;}
#right{position:absolute;top:0;left:790px;border:1px solid #999;}
2016-02-09
<style type="text/css">
*{margin:0; padding:0;}
#wrap{width:970px; 【任务1】}
#mainbody{position:relative; margin-top:15px;}
#left{【任务2】width:110px; }
#mid{position:absolute;top:0;left:130px;width:650px;border:1px solid #999;}
#right{position:absolute;top:0;left:800px;border:1px solid #999;}
</style>
*{margin:0; padding:0;}
#wrap{width:970px; 【任务1】}
#mainbody{position:relative; margin-top:15px;}
#left{【任务2】width:110px; }
#mid{position:absolute;top:0;left:130px;width:650px;border:1px solid #999;}
#right{position:absolute;top:0;left:800px;border:1px solid #999;}
</style>
2016-02-09
其实#mainbody和#footer没必要设置width:100%,因为块级元素的特性就是不设置宽度自动拓展到父元素或者是容器的宽度,任务二不填也可以达到同样的效果,并且减小了代码量
2016-02-08
#wrap{width:970px; margin:0 auto;}
#mainbody{position:relative; margin-top:15px;}
#left{float:left; width:110px; }
#mid{float:left; width:650px;border:1px solid #999;margin-left:13px;}
#right{position:absolute; margin-left:792px;border:1px solid #999;}
#mainbody{position:relative; margin-top:15px;}
#left{float:left; width:110px; }
#mid{float:left; width:650px;border:1px solid #999;margin-left:13px;}
#right{position:absolute; margin-left:792px;border:1px solid #999;}
2016-02-05