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

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 UTC