IE6中的CSS溢出问题 - 元素不显示/显示

时间:2010-01-04 19:01:13

标签: css internet-explorer-6 overflow

唯一比在IE6中出现CSS问题更糟的是IE6中的CSS问题与其他人的不同

我有一个div,具有固定的宽度和高度,溢出设置为滚动。它适用于IE7 / 8,FF,Chrome等。 div 不可见。它没有出现。就像我把display:none放在上面一样。

如果我删除溢出 - 它会显示出来。把它放回去 - 消失。

通常情况下,我可以通过这样的问题谷歌,但我找不到任何人以前遇到此错误。 This is irrelevantthis looked promising但没有帮助。

这是div结构:

<div style="width: 640px; position: absolute; z-index: 100001; left: 312px; top: 59.5px;min-height:0;">
    <div style="width: 100%; min-height:0px" >
=>      <div style="height: 450px; overflow-y: scroll; overflow-x: hidden; padding-right: 17px; min-height:0px;">
            <div style="min-height:0px;">
                <div style="min-height:0px;">
                    <table style="width:100%;border-collapse:collapse;">
                    //lots of rows
                    </table>
                    <input type="hidden" />
                </div>
                <input type="hidden" /><input type="hidden" />
            </div>
        </div>
        <div class="cColHeaderBG" style="text-align: right;"> //Shows up fine
            <input type="button" />
            <button>Save</button>  
        </div>
    </div>
</div>

我知道它很毛茸茸,很多是ASP.Net AJAX呈现弹出式面板的方式。

1 个答案:

答案 0 :(得分:1)

解决方案是改变

<div style="height: 450px; overflow-y: scroll; 

<div style="height: 450px !important; overflow-y: scroll; 

我不知道为什么这样有效(没有其他任何样式规则适用于任何地方),但确实如此。希望它可以帮助别人。