Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What's wrong with this declaration?

0 views
Skip to first unread message

Fierce Networks

unread,
Jan 7, 2003, 4:47:15 PM1/7/03
to
Hello All,

Validating my css (http://jigsaw.w3.org/css-validator/validator-uri.html), I
get this msg:
************************************************************************
a.. Line: 14 Context : div#coolAnchor .margins
Invalid number : marginonly 0 can be a length. You must put an unit after
your number : 0 0 0 20

************************************************************************
Here is the line in question:

div#coolAnchor .margins{margin:0px 0px 0px 20px;}

Verifying my syntax with this page,
http://www.w3.org/TR/REC-CSS2/box.html#propdef-margin I see nothing wrong...

So, what's wrong?

TIA!


Rowland Shaw

unread,
Jan 8, 2003, 7:46:48 AM1/8/03
to

Hrm. The validator doesn't fail for me on that:
http://jigsaw.w3.org/css-validator/validator?text=div%23coolAnchor+.margins%
7Bmargin%3A0px+0px+0px+20px%3B%7D&warning=2&profile=css2&usermedium=all
[URL will wrap]

Could it be that you were validating a different document to the one you
were checking? The error did state "your number : 0 0 0 20"

NB, the units for 0px are optional:
http://www.w3.org/TR/REC-CSS2/syndata.html#length-units


"Fierce Networks" <mar...@fierce-networks.com> wrote...
> Validating my css, I get this msg:

Fierce Networks

unread,
Jan 8, 2003, 1:36:52 PM1/8/03
to
Strange... Yes, it was the doc I intended to validate:
http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.classicpar
tyrentals.com%2Fstyles.css&warning=1&profile=css2

Check out line 14...

BTW, you'll see that I have MANY errors in my style sheet. I have been using
Eric Meyer on CSS, (Eric Meyer - http://www.ericmeyeroncss.com/) as my guide
<I'm a 1 year old CSS newbie>, so this is my real first attempt @ using css
on a professional site.

Thanks

"Rowland Shaw" <spamf...@anotherpointless.org> wrote in message
news:OEvZ6PxtCHA.2556@TK2MSFTNGP10...

Rowland Shaw

unread,
Jan 9, 2003, 5:15:39 AM1/9/03
to
Looking at the style sheet [
http://www.classicpartyrentals.com/styles.css ];
Line 14 is:
div#coolAnchor .margins{margin:0 0 0 20;}
and not
div#coolAnchor .margins{margin:0 0 0 20in; /* or whatever the correct units
are */}

Line 17 is:
width:250;
and not
width:250in; /* or whatever the correct units are */

Line 26 is:
margin:10px 0 10px -3;
and not
margin:10px 0 10px -3in; /* or whatever the correct units are */

Etc.


"Fierce Networks" <mar...@fierce-networks.com> wrote...


> Strange... Yes, it was the doc I intended to validate:
>
http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.classicpar
> tyrentals.com%2Fstyles.css&warning=1&profile=css2
>
> Check out line 14...
>
> BTW, you'll see that I have MANY errors in my style sheet. I have been
using
> Eric Meyer on CSS, (Eric Meyer - http://www.ericmeyeroncss.com/) as my
guide
> <I'm a 1 year old CSS newbie>, so this is my real first attempt @ using
css
> on a professional site.
>
>

0 new messages