W3C home > Mailing lists > Public > www-style@w3.org > June 2013

Re: margin-before and legend

From: Robert Hogan <robhogan@gmail.com>
Date: Tue, 4 Jun 2013 23:16:07 +0100
Message-ID: <CAD1xn+M2E=NcRbFPz0ckJQRDAY3qOGp8gNmhoJkNBKE1xJd-Sw@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>, Julien Chaffraix <jchaffraix@google.com>
On 4 June 2013 22:57, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>
> It would be useful to do some investigation of existing browser
> behavior, so that we can define this.
>
Quick and dirty summary:

FF: margin-top pushes the legend down and, if no margin-bottom is
specified, will detach it from the fieldset's border.
FF: if just margin-bottom is specified, it pushes the fieldset border
down from the legend.
FF: together, they will move the legend and the border down.

IE: only margin-top is respected and it pushes both legend and
fieldset border down

Opera/WebKit/Blink: margin-top and margin-bottom are largely ignored
when it comes to determing the position of the legend in relation to
the fieldset border

I think FF has the right idea: margin-bottom on a legend pushes the
fieldset border down away from it, while margin-top on a legend pushes
the legend down away from the fieldset border.
Received on Tuesday, 4 June 2013 22:16:34 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:12 UTC