Chris J Allen Chris J Allen - 3 months ago 9
CSS Question

Collapsing `margin` on `<legend>` tag

Can someone see why

margin-bottom
on the legend tag is collapsing? Thanks. I wouldn't normally post stupid CSS bugs like this, but this ones an exception :P

http://jsfiddle.net/pickledegg/XtR53/2/

Answer
legend+label {
    margin-top:50px;
    -webkit-margin-top-collapse: separate;
}

And you'd need to remove the margin-bottom from the legend.

I think this is a known WebKit bug.

Here's a modified Fiddle: http://jsfiddle.net/yRQDW/1/

Comments