溢出:auto在Firefox中不工作 [英] Overflow: auto does not work in Firefox
问题描述
我有一张桌子。它的< td>
有 overflow:auto
。
I have a table. Its <td>
have overflow: auto
.
宽度设置为100像素。在仅Firefox 中,超过100像素的文字不已隐藏,并替换为滚动条。
The width is set to be 100px. In Firefox only, text that exceeds 100px is not hidden and replaced with a scrollbar.
如何隐藏内容并在超过其容器宽度时有滚动条?
How can I hide content and have a scrollbar when it exceeds the width of its container?
推荐答案
此问题来自此处 a>也许可以解决您的问题
this question from here maybe solve your problem
nickb 答案:尝试将它包装在< div>
。我很确定overflow属性没有定义为< td& code>元素,至少在 HTML4 中它不是。
nickb answer: "Try wrapping it in a <div>
. I'm pretty sure the overflow attribute is not defined for a <td>
element, at least in HTML4 it's not."
尝试将溢出:auto
> wrapper 希望这可以帮助你
try to put your overflow:auto
to the wrapper
hope this can help you
pre, div {
width:100%;
overflow: auto !important;
}
工作 demo
这篇关于溢出:auto在Firefox中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!