CSS Validator is saying my usage of text-wrap:suppress is invalid
-
26-09-2019 - |
Question
I am using the W3C CSS Validator and it says that I have an error with the following code:
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
I have validated using CSS 2.1 as well as 3.0 and both give the same error.
Solution
I'd try white-space:nowrap;
instead. I believe that validates correctly, but haven't tried it.
OTHER TIPS
This must be a bug in the CSS validator. However, does it matter whether or not the CSS validates as long as it's working?
Or, try word-wrap: break-word
as described in this article from webdesignerwall.com which has come in handy for me several times.
http://www.webdesignerwall.com/tutorials/word-wrap-force-text-to-wrap/