css+div 两列并排 容器内显示
.liatmain 
{
width:950px;
background-color:#ff0000;
margin:0 auto;
}
.left
{
float:left;
width:728px;
}
.right
{
float:left;
width:222px;
background-color:#ffcc00;
}
.clear
{
clear:both;
}
<div class="liatmain">
<div class="left">{$MY_首页中部950A}</div>
<div class="right">{$MY_首页中部950B}</div>
<div class="clear"></div>
</div>
注:float:center,这样的写法是不对的。要让一个层居中,可以写margin:0 auto。我给你加的.clear是为了要清除浮动。兼容浏览器。加了背景,是为了测试
{
width:950px;
background-color:#ff0000;
margin:0 auto;
}
.left
{
float:left;
width:728px;
}
.right
{
float:left;
width:222px;
background-color:#ffcc00;
}
.clear
{
clear:both;
}
<div class="liatmain">
<div class="left">{$MY_首页中部950A}</div>
<div class="right">{$MY_首页中部950B}</div>
<div class="clear"></div>
</div>
注:float:center,这样的写法是不对的。要让一个层居中,可以写margin:0 auto。我给你加的.clear是为了要清除浮动。兼容浏览器。加了背景,是为了测试
    东莞龙光网络
提供各种平台的解决方案
 网站建设与网站改版
 百度SEO(自然排名优化,年付)
 中国商机发布引擎(软件)
 SEO顾问咨询(门户站)
 网络推广外包(月付
http://www.xieguang133.com/
posted on 2009-08-20 00:00 xieguang133 阅读(212) 评论(0) 收藏 举报
                    
                
                
            
        
浙公网安备 33010602011771号