<div>
        <div id="div1" style="float:left; width:100px;"></div>
         <div id="div2" style="float:left; width:100px;"></div>
          <div id="div3" style="float:left; width:100px;">这里的内容</div>
           <div id="div4" style="float:left; width:100px;"></div>
            <div  id="div5"style="float:left; width:100px;"></div>
    </div>在火狐浏览器中,为什么div3里的内容会显示在div1 的位置是上呢?而在360浏览器里显示在div3的位置?

解决方案 »

  1.   


    而且如果div1 和 div2 如果有文字的话,那么div3 的东西就显示在div3里了
      

  2.   

    这个不知道能不能帮到你,祝你好运了height:800px; /*所有浏览器*/

    height:1045px !important; /*FF IE7*/

    _height:1000px; /*IE6*/

    *height:800px; /*IE6 IE7*/

    *+height:500px; /*IE7*/

    height:920px\0; /*IE8*/
      

  3.   

    360用的ie6核心? ie6是会给div一个默认高度的
      

  4.   

    因为各个浏览器的标准不同,在firefox或chrome等浏览器如果块里面没任何东西,那么默认长度相当于零,而有些浏览器,如IE,还是会根据width来布局
    如果你想各浏览器一样,可以这样写
        <div>
            <div id="div1" style="float:left; width:100px;">&nbsp;</div>
             <div id="div2" style="float:left; width:100px;">&nbsp;</div>
              <div id="div3" style="float:left; width:100px;">这里的内容</div>
               <div id="div4" style="float:left; width:100px;">&nbsp;</div>
                <div  id="div5"style="float:left; width:100px;">&nbsp;</div>
        </div>