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

我剛學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>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章