- From: Chris Ridd <C.Ridd@imc.exec.nhs.uk>
- Date: Tue, 23 Jul 1996 16:31:55 +0100
- To: Bert Bos <Bert.Bos@sophia.inria.fr>
- Cc: www-style@w3.org
Bert Bos wrote:
> This is incorrect.
>
> The margin properties are among the ones that are *not*
> inherited. Every element has a margin of zero, unless explicitly set
> in the style sheet.
>
> *But*: the margins are relative, i.e., they are counted starting from
> the parent's margin. If the window is 20cm wide and you set a margin
> on the BODY of 2cm on each side, the children of BODY will think the
> window is only 16cm wide. The diagram in section 4 of the CSS1 spec[1]
> is meant to show how elements nest inside each other.
>
> Thus, if you want a global margin of 6em, all you have to do is set
>
> BODY {margin-left: 6em}
>
> and leave all the other margins alone. The child elements will by
> default have a zero margin and they will be placed inside the parent's
> margins.
Thanks Bert (and Chris Lilley). Now I reread the spec it starts to all
make (a little more) sense.
Unfortunately, I can't seem to find a browser which implements the
interesting parts of CSS1.
MSIE3.0beta2 doesn't seem to recognise the CSS1 features which mirror
the HTML extensions like '<body background=foo.gif>' (ie 'body
{"background: url(foo.gif)}'), which is a little frustrating.
Is there a list somewhere describing what subsets the different browsers
have implemented?
Chris
Received on Tuesday, 23 July 1996 11:33:07 UTC