简体   繁体   English

CSS验证程序说我对text-wrap:suppress的使用无效

[英]CSS Validator is saying my usage of text-wrap:suppress is invalid

I am using the W3C CSS Validator and it says that I have an error with the following code: 我正在使用W3C CSS验证程序,它说以下代码有错误:

Property text-wrap doesn't exist : suppress suppress 属性文本换行不存在:抑制抑制

.fieldLabelRed
{
    padding:0px 2px 0px 2px;
    margin:0px 10px 0px 0px;
    color:#FF0000;
    text-wrap:suppress; <--- This line
}

I have looked at the CSS manual, and this is what I've found, but I don't see anything wrong: Text Wrap Settings: the 'text-wrap' property 我看了CSS手册,这就是我发现的内容,但是我没有看到任何错误: 文字换行设置:'text-wrap'属性

I have validated using CSS 2.1 as well as 3.0 and both give the same error. 我已经使用CSS 2.1和3.0进行了验证,并且都给出了相同的错误。

I'd try white-space:nowrap; 我会尝试white-space:nowrap; instead. 代替。 I believe that validates correctly, but haven't tried it. 我相信可以正确验证,但尚未尝试过。

This must be a bug in the CSS validator. 这必须是CSS验证程序中的错误。 However, does it matter whether or not the CSS validates as long as it's working? 但是,只要CSS正常工作,它是否有效都重要吗?

Or, try word-wrap: break-word as described in this article from webdesignerwall.com which has come in handy for me several times. 或者,尝试word-wrap: break-word如webdesignerwall.com这篇文章中所述的word-wrap: break-word ,它对我来说很方便。

http://www.webdesignerwall.com/tutorials/word-wrap-force-text-to-wrap/ http://www.webdesignerwall.com/tutorials/word-wrap-force-text-to-wrap/

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

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