Re: CSS 'width' Question

On Thu, Oct 07, 2004 at 10:33:16AM -0500, Aaron Smith wrote:
>    According to CSS1 spec 5.5.23, the width style "Applies to: block-level
>    and replaced elements."
 
>    Why, then, does the CSS Validator (http://jigsaw.w3.org/css-validator/)
>    not complain about <SPAN CLASS="wide">Blah</SPAN>, where class wide
>    contains width: 100%?

The short answer is that while it might not make sense, it is still
syntactically correct, and that CSS is entirely independent of any
markup languages that it might be applied to.

Besides ...

* Despite not being applicable now, it might be in the future. 

* The wide class might be applied to other elements too

* The span element might be made to display block elsewhere

* The markup language might be one in which the SPAN element is
display: block by default.

-- 
David Dorward                                      http://dorward.me.uk

Received on Thursday, 7 October 2004 15:43:53 UTC