Re: Floats need explicit width??

Dear W3C

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!!
Isn't it after all 'Casscading' style sheet ? You define width there,  
color here and get both width and colored box :-)

Thanks
Tenzin Tsarma

Received on Thursday, 9 July 2009 09:07:30 UTC