简体   繁体   English

CSS覆盖空白:网站上的nowrap

[英]CSS override white-space:nowrap on a website

A website that I use on a regular basis does this. 我经常使用的网站会这样做。 This causes way to much stuff to be on a single line and it goes off the screen. 这导致很多东西都放在一行上,并从屏幕上消失了。 It needs to do word wrapping but what see below prevents it. 它需要进行自动换行,但是下面看到的阻止了它。

div.dbThreadDetailTreeRowCellItem {
    white-space: nowrap;
}

https://stackoverflow.com/a/1258512/985898 https://stackoverflow.com/a/1258512/985898

I don't want to have to open firebird and fix it every time I go to the website. 我不想每次我访问网站时都打开firebird并对其进行修复。 Is there hopefully an easy way to fix this with your css files? 希望有一种简单的方法可以使用CSS文件修复此问题吗? I am using firefox. 我正在使用Firefox。

https://superuser.com/a/295806/93715 https://superuser.com/a/295806/93715

Firefox User Profile Folder --> Chrome -- > userChrome.css Firefox用户配置文件文件夹-> Chrome-> userChrome.css

I added this to my userChrome.css file. 我将此添加到了userChrome.css文件中。 What do I need to add to my css file? 我需要添加什么到CSS文件?

.break-word {
  word-wrap: break-word;
}
-moz-hyphens: auto;
p
{
white-space:normal;
} 
.u_nowrap {
    white-space: normal !important;
}
pre { white-space: pre-wrap !important; }

Is there also a way to fix this issue in Chrome? 还有在Chrome中解决此问题的方法吗?

It doesn't look like any of your css rules apply to the container you said is causing the problem. 您的CSS规则似乎都不适用于您说引起问题的容器。

Try adding this line: 尝试添加以下行:

div.dbThreadDetailTreeRowCellItem{ word-wrap: break-word !important; white-space: normal !important; }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM