views:

27

answers:

3

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.

+1  A: 

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?

adamse
The very first thing anyone will tell me before helping me with CSS is "make sure it validates". I'm not 100% sure it will work in all browsers based on my limited testing.
Joe Philllips
All things introduced in the CSS3 spec are not implemented across all browsers. This is something you as a developer have to be aware of.
adamse
@adamse I realize that but the validator should have it implemented.
Joe Philllips
@joe: Yes, and you should file a bug with the W3 CSS validator team: http://jigsaw.w3.org/css-validator/Email.html
adamse
Bug report submitted!
Joe Philllips
+1  A: 

I'd try white-space:nowrap; instead. I believe that validates correctly, but haven't tried it.

kmfk
Oddly enough, `white-space` is a shorthand property for text-wrap.
Joe Philllips
This may give you your desired effect and validate, but I believe this is more in line with `text-wrap: none;` - which has potential to overflow block elements, you'd have to experiment.
kmfk
A: 

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/

JAG2007