Re: Margins and standards

> [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 UTC