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

Re: Floats need explicit width??

From: James Hopkins <james@idreamincode.co.uk>
Date: Fri, 10 Jul 2009 08:48:40 +0100
Message-Id: <36087446-DEB9-4F1A-93D5-F86E49CC7666@idreamincode.co.uk>
To: Tsarma Tenzin <web@burki-scherer.ch>
Cc: "www-validator-css@w3.org" <www-validator-css@w3.org>
> As Tiscali has written, I think too CSS validator is loosing its  
> charm.
>
> I have defined in my css general classes like
>
> ..right {
>    float : right;
> }
>
> ..left {
>    float : left;
> }
>
> div {
>    width : 400px;
> }
>
> and now i have in my HTML  a div with class right . I am doing this  
> coz. I don't want CMS putting inline styles in my HTML tag, and  
> instead they can put a class.
>
> And the joke is following don't give you the false warning.
>
> ..right {
>    float : right;
>    width : auto;
> }
>
> ..left {
>    float : left;
>    width : auto;
> }
>
> But then why we have to write width : auto, when all element has by  
> default width auto!!

It's a syntax validator, and it doesn't attempt to interpret the  
cascade in any way.

> Isn't it after all 'Casscading' style sheet ? You define width  
> there, color here and get both width and colored box :-)
>
> Thanks
> Tenzin Tsarma
>
> <afa_sml-08-AAplus.gif>
>
>
Received on Friday, 10 July 2009 07:49:22 GMT

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