<!--大DIV-->
    <div style="width:1000px; height:300px; margin-top:10px;">
    
    
    <!--div1-->
    <div style="width:700px; height:300px; background-color:Aqua; float:left;">1</div>
        <!--div2-->
    <div style="width:20px; height:300px; background-color:Red; float:left;">2</div>    
    <!--div3-->
    <div style="width:280px; height:300px; background-color:Aqua; float:left;">3</div>
    
    
    </div>现在在IE8中 显示是正常的,但是在IE6 第3个DIV会换行跑下面去了,在IE8 3个DIV都是横排着的,到底是怎么回事?

解决方案 »

  1.   

    三个加起来比外面的还大,我觉得应该是ie8有bug。否则应该第三个都是在另外一行。
      

  2.   

    width:280px; height:300px这些都改成百分比。
      

  3.   

    第三个 加上 overflow:hidden;
    就不会另外一行了。
      

  4.   

    百分比?
    60%  2%  38%里面3个DIV都改成这样?
      

  5.   

    为啥你的大div的height不等于三个小div的height之和呢?为啥使用那么多的float呢?
      

  6.   

    谢谢你们的帮忙了,我解决了,我想到一个更加简单的办法我把代码贴给你们看看
        <div style="width:1000px; height:300px; margin-top:10px; background-color:Black;">
        
        
        <!--公司动态-->
        <div style="width:720px; height:300px; background-color:Aqua; float:left;">
        
        <div style="width:700px; height:300px; background-color:Aqua; float:left;">1</div>
        <div style="width:20px; height:300px; background-color:Red; float:left;">2</div>
        
        </div>
        
        <div style="width:280px; height:300px; background-color:Olive; float:left;">3</div>
            
        </div>
      

  7.   

    这样也成啊,我每次写的CSS在IE8中显示正常,在IE6中就一塌糊涂。谢谢分享!