溢出:auto在Firefox中不工作 [英] Overflow: auto does not work in Firefox

查看:125
本文介绍了溢出:auto在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?

http://jsfiddle.net/be6tM/10/

推荐答案

此问题来自此处 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆