首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

关于div+css排版的有关问题

2012-03-13 
关于div+css排版的问题htmlheadmetahttp-equiv Content-Typecontent text/htmlcharsetgb2312

关于div+css排版的问题
<html>      
<head>      
<metahttp-equiv= 'Content-Type '   content= "text/html;   charset=gb2312 ">      
<title> SEO参考:XHTML之经典三行两列布局-   seobbs.net </title>      
<style   type= "text/css ">      

body   {      
        background:   #999;      
        text-align:   center;      
        color:#333;      
        font-family:Verdana,Arial,   Helvetica,   sans-serif;      
}      

a:link,visited   {color:#004592;text-decoration:none;}      
a:hover   {color:#004592;text-decoration:underline;}      
a:active   {color:#004592;text-decoration:none;}      

img   {border:0px;}      

#header   {      
        margin-right:   auto;      
        margin-left:   auto;      
        padding:   0px;      
        width:   776px;      
        background:   #EEE;      
        height:   60px;      
        text-align:   left;      
}      

#contain   {      
        margin-left:   auto;      
        margin-right:   auto;      
        width:   776px;      
}      

#mainbg   {      
        float:   left;      
        padding:   0px;      
        width:   776px;      
        background:   #60A179;      
}      

#right   {      
        float:right;      
        margin:   2px0px   2px0px;      
        padding:   0px;      
        width:   574px;      
        background:   #ccd2de;      
        text-align:left;      
}      

#left   {      
        float:   left;      
        margin:   2px   2px0px0px;      
        padding:   0px;      
        background:   #F2F3F7;      
        width:   200px;      
        text-align:left;      
}      

#footer   {      
        clear:both;      
        margin-right:   auto;      


        margin-left:   auto;      
        padding:   0px;      
        width:   776px;      
        background:   #EEE;      
        height:   60px;      
}      

.text   {margin:0px;padding:20px;}      

</style>      

</head>      

<body>      

<div   id= "header "> header </div>      


<div   id= "contain ">      
        <div   id= "mainbg ">      
                <div   id= "right ">      
                        <div   class= "text "> text <p> 段落 </p> <p> 段落 </p> <p> 段   落 </p> <p> 段落 </p> <p> 段落 </p> </div>      
                </div>      
                <div   id= "left ">      
                        <div   class= "text "> left </div>      
                </div>      
        </div>      
</div>      

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

</body>      
</html>  

他是如何做到兼容的呢?

在DW里,好象用div+css并非所见既所得了

我自己也写了一个(初学)

但是在DW里,看到的块是从上到下分布的,但是在IE里看却没问题

请教前辈原因

[解决办法]
我也有这 问题
不过应为浏览器看见是好的所以 就没研究
QQ群 25656077 web2.0技术联盟 div+css网页设计
欢迎大家一起来他讨论关于网页方面的技术问题……

热点排行