W3C home > Mailing lists > Public > www-style@w3.org > May 1999

Re: Margins and IE 4.5 for the Mac (example)

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Tue, 11 May 1999 00:55:26 +0100 (BST)
To: "Jeff@Ratliff.com" <jeff@ratliff.com>
cc: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.9905110047530.17996-100000@amos.bath.ac.uk>
On Mon, 10 May 1999, Jeff@Ratliff.com wrote:
> Here's an example:
> 
> <html>
>   <head>
> <style>
>       body { margin: 0 0 0 3em; }
>       #nomargin { margin: 0 0 0 0; }
>       #noemafter { margin-bottom: 0; }
> </style>
>   </head>
>   <body>
>     <center><h1 id="nomargin">Yes?</h1></center>
>     <center><h3 id="noem">No.</h3></center>
>   </body>
> </html>

What a peculiar example... ;-)


> If I understand correctly (and I have to admit to being new to
> stylesheets), the "Yes?" and the "No." should *not* be centered
> under each other [...]

Assuming steps to make the snippet valid (adding doctype, title
element), changing the second id to "noemafter" as per the one in
the stylesheet, and assuming the ua css is basically:

   center,h1,h3 { display:block; }
   /* no horizontal margins defined anywhere */

...then the above should be rendered with the "Yes" and "No" centered
across the body. This implies that they will actually not be centered
across the viewport, since the body's "insides" will be off center
(there being a three em strip on the RHS).

eg:

    |<----------->|
   +------------------+
   |      Yes?        |
   |       No.        |
   +------------------+

...with the "Yes" and "No"s centered across the marked section.


> [...] that is how these words are rendered by IE 4.5. However, in IE
> 5.0, the words are centered under each other.

In that case, it would appear that MacIE is incorrect. I do not have
MacIE to test it myself, however.

-- 
Ian Hickson 
U+2642 U+2651
U+262E U+2603 U+263A
Received on Monday, 10 May 1999 19:55:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:59 GMT