W3C home > Mailing lists > Public > www-validator-css@w3.org > October 2004

Re: CSS 'width' Question

From: David Dorward <david@dorward.me.uk>
Date: Thu, 7 Oct 2004 16:43:51 +0100
To: Aaron Smith <aaron@gwmicro.com>
Cc: www-validator-css@w3.org
Message-ID: <20041007154351.GA26529@us-lot.org>

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 GMT

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