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

Re: CSS validation error query

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 18 Sep 2004 23:34:40 +0200
To: "J. Grant" <jg@jguk.org>
Cc: www-validator-css@w3.org
Message-ID: <414ca95f.29174070@smtp.bjoern.hoehrmann.de>

* J. Grant wrote:
>       Invalid number : marginonly 0 can be a length. You must put an 
>unit after your number : 6

>The "margin" does not have a space after it.  Also I do not understand 
>the error.  Does it mean '6' in this instance is not a valid margin? 
>And that only 0 is a valid margin?  that does not seem to make sense though.

A margin of 6 milimeters is probably a bit different from a margin of 6
centimeters, a browser cannot know whether you mean 6mm or 6cm so the
Validator asks you to add a unit to the 6 to clear things up. You can

  margin: 6px;
  margin: 6pt;
  margin: 6cm;

but not

  margin: 6;
Received on Saturday, 18 September 2004 21:35:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:40 UTC