html - div 的高度不会在 IE7 中自动调整

标签 html css css-tables

我在 div 中呈现了一个表格。以下样式应用于外部 div。

 width:auto;
 background-color:white;
 overflow:auto;
 height: auto;
 scrollbar-face-color:#E0EEEE; 
 scrollbar-arrow-color:#33ccff; 
 scrollbar-track-color:#EEFFFF; 
 scrollbar-shadow-color:#EEFFFF; 
 scrollbar-highlight-color:#EEFFFF; 
 scrollbar-3dlight-color:#EEFFFF; 
 scrollbar-darkshadow-Color:#EEFFFF;

在 IE8 中,外层 div 带有水平滚动条,但在 IE7 中显示了两个滚动条,外层 div 不会自动调整高度。我希望它看起来与 IE8 中的一样。有人可以提出建议吗?

以下是两个版本 IE 中的屏幕截图链接:

http://img692.imageshack.us/img692/6374/81306247.png

最佳答案

因为您只在一个方向上发生溢出,所以设置 overflow-x: auto 而不是 overflow: auto

关于html - div 的高度不会在 IE7 中自动调整,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4647501/

相关文章:

html - 使两个 div 响应 - 在大屏幕上并排,在移动设备上彼此下方

HTML/CSS : The div placement changes when filled with conent

html - CSS/HTML - 嵌套表格的问题

c# - asp.net 以编程方式创建表和 css 优先级

jquery - 将另一个 div 插入时将其推出

html - 模态内的边界问题

css - 为手机加载不同的 CSS(但不适用于平板电脑)

css - 为什么 Firefox 不显示表格单元格的 border-right 或 border-left?

html - CSS html 表格左右边框

html - 对齐列表中心,而列表项在 d-flex 中向左浮动