W3C home > Mailing lists > Public > www-html@w3.org > December 2000

Re: Margins and standards

From: Clover Andrew <aclover@1VALUE.com>
Date: Wed, 13 Dec 2000 14:25:05 +0100
Message-ID: <5F78AA062F6AD311A59000508B4AAF6D092BFC@PCS02>
To: "'www-html@w3.org'" <www-html@w3.org>
> [marginthis, marginthat] seem to be the only way to achieve
> this effect (in the real world) even on NN4 and so on.

Certainly in Netscape 4 you have to use marginheight/marginwidth
to remove the margins, though you could also try using CSS
absolute positioning to put things right into the corner of the
page, which might have the effect you want.

IE3 uses leftmargin/topmargin. WebTV uses hspace/vspace. If you
need to support these browsers, put all the non-standard
margin attributes in, and use a custom DTD or suffer validation
errors. (The validator shouldn't necessarily be the Arbiter of
All that is Good, it's just a tool to help you write good HTML.)

If you can be satisfied with supporting IE4+, NN6/Mozilla, Opera,
and a few others, you can use standard CSS, eg.:

  <style type="text/css"><!--
    body { margin: 0 }
  --></style>

> Does anyone know why they are not valid in the Transitional DTD

Because they're horrible. :-)

> it wants to be a usable version of XHTML compatible with older
> browsers?

Yes, but as always it's a compromise. The margin attributes
didn't make it in, maybe because they were too new to be
that widely used at the time; certainly because they're quite
easy to replace with (much nicer) CSS. I guess no-one thought
we'd still be stuck designing for Netscape 4.x in 2000.

-- 
Andrew Clover
Technical Support
1VALUE.com AG
Received on Wednesday, 13 December 2000 08:31:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:44 GMT