日期:2014-05-17  浏览次数:20698 次

请教大家一个CSS排版问题
CSS code


<?php
    include_once("top.php");
?>
<style>
.mainflame{
    margin-top:10px;
    width:951px;
    height:900px;
    margin-left:auto;
    margin-right:auto;    
}

.mainflame_service{
    border:2px solid #c7e0f4;    
    background:#edf5fc;
    width:185px;
    height:235px;
    padding-top:5px;
    padding-left:5px;
}
.mainflame_service_img_fuwu{
    background:url(img/youxi171fuwu.jpg);
    width:180px;
    height:42px;
}
.mainflame_service_line{
    width:180px;
    height:0px;
    border:1px solid #c7e0f4;        
}
.mainflame_service_textlist{
    padding-bottom:5px;
    padding-top:5px;
    width:180px;
    font-size:12px;
    border-bottom:1px solid #dcedfb;    
}
.mainflame_ad{
    padding-bottom:5px;
    padding-top:5px;
    width:515px;
    height:180px;
    font-size:12px;
    border:1px solid #dcedfb;    
}


</style>
<div class="mainflame">
    <div class="mainflame_service">
        <div class="mainflame_service_img_fuwu">
        </div>
        <div class="mainflame_service_line">
        </div>
        <div class="mainflame_service_textlist">
        <a href="#">游戏币</a></div>
        <div class="mainflame_service_textlist">
        游戏币
        </div>
        <div class="mainflame_service_textlist">
        游戏装备
        </div>
        <div class="mainflame_service_textlist">
        游戏点卡
        </div>
        <div class="mainflame_service_textlist">
        账号交易
        </div>
        <div class="mainflame_service_textlist">
        常见问题
        </div>
        <div class="mainflame_service_textlist">
        客服中心
        </div>                                                        
  </div>
  <div class="mainflame_ad">
  </div>
</div>
<?php
    include_once("bottom.php");
?>



我一直没搞明白为什么mainflame_ad这个框框换行了, 按理来说mainflame_ad加上mainflame_service的宽度没有超过mainflame宽度不就不会换行的吗?

请问一下要怎么才能让他们都在同一行,并且在mainflame中靠左,置顶?