您的位置:首页 > 其它

用DIV如何排出一行三列的布局

2012-11-29 17:23 197 查看
我刚学DIV布局,如题,

float:只有左和右属性,

不会是用这个实现一行三列的布局吧?
<style>

#ma{ width:790px; }

#left{ width:240px; background-color:#FF0000; float:left;}

#center{ width:300px; background-color:#ffff00; float:left;}

#right{ width:250px; background-color:#000000; float:left;}

</style>

<body>

<div id="ma">

<div id="left">a</div>

<div id="center">b</div>

<div id="right">c</div>

</div>

</body>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: