Account for margin after when laying out <legend> element