我希望有人能够在这里帮助我。我试图尽我所能简化我的例子。
我有一个绝对定位的DIV,在这个例子中,我填写了浏览器窗口。这个div有overflow:auto属性,当内容太大而不能显示DIV时,提供滚动条。
在DIV中,我有一个表来呈现一些数据,它的宽度是100%。
当内容变得太垂直时,我希望垂直滚动条出现,表格水平缩小以适应滚动条。然而在IE7发生了什么是水平滚动条也出现,尽管仍然有足够的空间水平的所有内容的div。
这是IE特定的 – firefox工作完美。
完整来源下面。任何帮助非常感谢。
托尼
/p>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Table sizing bug?#maxsize
{
position: absolute;
left: 5px;
right: 5px;
top: 5px;
bottom: 5px;
border: 5px solid silver;
overflow: auto;
}
This will be fine until such time as the vertical size forces a
vertical scroll bar. At this point I'd expect the table to re-size
to now take into account of the new vertical scroll bar. Instead,
IE7 keeps the table the full size and introduces a horizontal
scroll bar.
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R |
Resize the browser window vertically so this content doesn't
fit any more
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello