开发者

overflow:hidden and float:left on IE6

开发者 https://www.devze.com 2023-02-15 03:16 出处:网络
Just to frame you. Look at the following code. Basically I have a table inside a div. When the table gets too big the overflow hidden triggers.

Just to frame you. Look at the following code.

Basically I have a table inside a div. When the table gets too big the overflow hidden triggers.

PROBLEM: in IE6 the "some text" gets hidden as expected but the floated span not.

Is there a way around开发者_运维问答 of fix it?

#wrap{
    overflow:hidden;
    height:20px
}
span{
    float:left;
    height:10px;
    width:10px;
    background:url(image.jpg) no-repeat 0 0;
}

<div id="wrap">
  <table>
     <tr>
        <td><span></span> some text</td>
     </tr>
     <tr>
        <td><span></span> some text</td>
     </tr>
     <tr>
        <td><span></span> some text</td>
     </tr>
  </table>
</div>


Try giving height:1%; for ie6 css. as below.

wrap{

overflow:hidden;
height:%;

}

0

精彩评论

暂无评论...
验证码 换一张
取 消