CSS技巧(五)横向两列布局(左列固定,右列自适应)
布局结构

HTML
<div class="parent"> <div class="side">侧栏</div> <div class="main">主栏</div> </div>
.side{ width:200px; height:200px; float:left; background:red; } .main{ height:200px; margin-left:210px; background:blue; }
布局结构

HTML
<div class="parent"> <div class="side">侧栏</div> <div class="main">主栏</div> </div>
.side{ width:200px; height:200px; float:left; background:red; } .main{ height:200px; margin-left:210px; background:blue; }