Chris J Allen Chris J Allen - 1 year ago 82
CSS Question

Collapsing `margin` on `<legend>` tag

Can someone see why

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

Answer Source
legend+label {
    -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:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download