Re: Checking for Units in regard to Dimension Specifications (also PHP)

On Fri, 2004-11-26 at 22:58 +0000, Mike Youell wrote:

> It would be really useful if the validator encouraged the use of units
> when specifying dimensions.
>  
> e.g.
> style="padding-left: 12" should be:
> style="padding-left: 12px" or whatever units.

In CSS non-zero lengths MUST have units, but that is CSS, not Markup and
thus is the job of the CSS Validator, not the Markup Validator.
 
> The are three good reasons for this:
>  
> 1) Netscape seems to ignore the above padding if you don't specify the
> units, whereas IE doesn't.

This is a bug in IE.
 
> Also it would be useful to be able to validate php, or at the very
> least advise people what to do to validate it.

PHP is a programming language, not markup. It can't be validated, only
its output can (and you do that by giving the validator the URI to a
document generated by PHP - which seems to me to be too obvious to
explicitly mention).
 

-- 
David Dorward <david@dorward.me.uk> <http://dorward.me.uk/>

Received on Saturday, 27 November 2004 10:30:29 UTC