Re: Margins and IE 4.5 for the Mac

On Wed, 5 May 1999, Jeff@Ratliff.com wrote:

> This code in a stylesheet produces a 1 em bottom margin for h1 tags in
> the associated HTML document under IE 5.0 for Windows 98:
>
>    h1 { margin: 0,0,1em,0; }
>
> However, the margin does not appear under IE 4.5 for the Macintosh.
> Any ideas?

Yes: Use valid CSS. ;-)

The commas are invalid. What you should have said was:

   h1 { margin: 0 0 1em 0; }

You will find that kind of details in the spec:

   http://www.w3.org/TR/REC-CSS2/

Also, a validator would have told you that your CSS was invalid:

   http://jigsaw.w3.org/css-validator/

The problem is that Windows IE 5.0 is ignoring a large section of the
CSS spec, mainly the forward compatible parsing rules. Mac IE 4.5 is
correctly ignoring the property/value pair, since it uses incorrect
grammar. 

Now that you have been burned by the lack of compliance in popular
browsers, do something about it:

   http://www.webstandards.org/

Or, e-mail your complaint directly to Microsoft: wasp@microsoft.com

-- 
Ian Hickson 
U+2642 U+2651
U+262E U+2603 U+263A

Received on Wednesday, 5 May 1999 12:44:02 UTC