开发者

CSS - IE6 overflow

开发者 https://www.devze.com 2023-02-15 07:17 出处:网络
I can see some other question have been raised around this issue but none of the answers fixed it for me.

I can see some other question have been raised around this issue but none of the answers fixed it for me.

I have a table which is inside a <div>. In IE7 and above this renders fine and the table can be seen clearly using scroll bars. In IE6 however this renders as a single line (e.g. height of 1px).

Here is the css around these elements.

    DIV.ScrollFrame {
        overflow: auto;
        height: 100%;
    }

    .DataTable {
        border-collapse:collapse;
    }

Then the html look like this开发者_如何学编程

<div class="ScrollFrame" >
    <table class="DataTable">
        //some asp to generate the data
    </table>
</div>

Sorry a cannot provide pictures as the data in the table is confidential.

Thank you in advance.


If your solution is to set a fixed height, make sure you serve it for IE6 only. Best practice is to use an IE6 only stylesheet displayed with conditional comments, like so:

<!--[if IE 6]>
        <link href="/styles/ie6.css" rel="stylesheet" media="screen, print"/>
<![endif]-->

Alternatively you can use the * html hack, which only IE6 understands.


Hm, i´m not sure, but you can try this for ie6:

* html DIV.ScrollFrame { overflow:scroll; }
0

精彩评论

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