W3C home > Mailing lists > Public > www-validator-css@w3.org > September 2009

Floats and Widths (was Re: Bug)

From: David Dorward <david@dorward.me.uk>
Date: Thu, 3 Sep 2009 16:16:03 +0100
Message-Id: <279457DB-D5F8-4594-B93C-3A97B70332C2@dorward.me.uk>
To: www-validator-css@w3.org
On 3 Sep 2009, at 15:51, Andreas Prilop wrote:
>> If you test this code you will get a warning "..floated elements
>> need to have a width declared.." even if width is defined.
>
> http://jigsaw.w3.org/css-validator/validator?text=%2Etest%7Bfloat%3Aleft%3Bwidth%3A100px%7D#css

Well, yes. If you use a different test case to the one originally  
provided.

If you use the original code (which has the float and width rules in  
different rule-sets with identical selectors), then it will show the  
warning.

Another, related issue, is that the warning appears when using the CSS  
2.1 profile, despite the requirement being removed: http://www.w3.org/TR/CSS21/changes.html#q58

-- 
David Dorward
http://dorward.me.uk
Received on Thursday, 3 September 2009 15:16:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:25 GMT