关于dreamweaver的css和div布局代码

这张图上的网页代码是怎样的,主体两个方框是如何设置的

<style type="text/css">
    .max{ width:800px; height:auto;}
    .top{ width:800px; height:120px; border:1px solid red; background:#6CC}
    .center{ width:800px; height:355px; border:1px solid #393; margin-top:10px;}
    .center-top{ width:800px; height:175px; }
    .center-bottom{ width:800px; height:160px; margin-top:10px;}
    .center-left{ float:left; width:380px; height:155px; border:1px solid red; margin-left:10px; margin-right:10px; margin-bottom:5px;}
    .center-right{ float:right; width:380px; height:155px; border:1px solid red; margin-right:10px; margin-bottom:5px;}
    .center-left-top{ height:25px; width:380; background:#999;}
    .center-right-top{ height:25px; width:380; background:#6CC;}
    .bottom{ background:#CCC; width:803px; height:100px; margin-top:5px;}
    .bottom-center{ width:600px; height:80px; margin-top:8px; margin-bottom:8px; text-align:center;}
</style>
<body>
    <div class="max">
    <div class="top"></div>
    <div class="center">
        <div class="center-top"></div>
        <div class="center-bottom">
            <div class="center-left">
                <div class="center-left-top">魅力华夏
                </div>
                <div class="center-left-bottom"></div>
            </div>
            <div class="center-right">
                <div class="center-right-top">人文地理
                </div>
                <div class="center-right-bottom"></div>
            </div>
        </div>
    </div>
    <div class="bottom">
        <div class="bottom-center">内容</div>
    </div>
</div>
</body>

 

温馨提示:答案为网友推荐,仅供参考
第1个回答  2013-12-03
这个页面用DIV+CSS写是很简单的,几个DIV就可以完成,你说的主体两个方框应该是两个列表内容吧,只要设置好宽度,样式属性为:float:left;,即可并排显示。
第2个回答  2013-12-03

<style>

#body{width:900px; height:600px; background-color:#fff;}

#banner{width:850px; height:100px; background-color:#ddd; }

#main{width:850px; height:400px;  border:1px blue solid; margin-top:10px; }

#neirong{width:800px; height:200px;  background-color:#fff; margin-top:8px;}

#neirong_1{width:390px; height:170px;  margin-top:8px; float:left; margin-left:25px; border:1px green solid;}

#neirong_2{width:390px; height:170px;   margin-top:8px;float:right; margin-right:25px; border:1px green solid;}


#footer{width:850px; height:100px; background-color:#ddd; margin-top:10px;}

</style>


<center>

<body>

<div   id="body">

<div id="banner"></div>

<div id="main"><div id="neirong">国家旅游局警示:禁收老年游附加费</div>

<div id="neirong_1">魅力华夏</div><div id="neirong_2">魅力华夏</div></div>

<div id="footer"></div>


</div>

</body>

</center>

  

我给你做出来了一个布局,你可以看一看  

相似回答