Re: margin-before and legend

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