您的位置:首页 > 前端开发 > 技术笔记

左右两栏布局自适应

2015-02-02 17:15:52

左右两栏布局自适应

HTML


<div class="fix">
    <div class="l"></div>
    <div class="cell"></div>
</div>


CSS


.fix{*zoom:1;}.fix:after{display:block; content:"clear"; height:0; clear:both; visibility:hidden;}
.l{float:left;}
.cell{display:table-cell; *display:inline-block; width:2000px; *width:auto;}


参考:http://www.zhangxinxu.com/wordpress/2012/01/display-table-cell-display-table-layout-fixed-word-wrap-break-word/ http://www.zhangxinxu.com/study/201201/display-table-cell-width-auto.html


more 练手的东东
more 转载
more 最近访客