如果一个页面分成(上、左、右、下)四个部分,在不使用框架的情况下如何使用样式表写出最终的实现效果?

来源:百度知道 编辑:UC知道 时间:2024/06/11 19:43:59

可以首先考虑表格
---------------------------------------------------------------
<table width="600" height="500" align="center">
<tr><td id="mytop" colspan="2">上</td></tr>
<tr><td id="myleft">左</td><td id="myright">右</td></tr>
<tr><td id="mybottom" colspan="2">下</td></tr>
</table>

//
div+css
----------------------------------------------------------------
<style type="text/css">
.layer {text-align:center;}
.mytop,.mybottom {width:620px; height:100px; border:#999999 1px solid;}
.mycenter {width:620px; height:400px; padding:10px;}
.myleft {width:300px; height:400px; float:left; border:#999999 1px solid;}
.myright {width:300px; height:400px; float:right; border:#999999 1px solid;}

</style>
<