I’m having an issue containing legends within fieldsets for IE7 and IE 8.
Basically I have a set of fieldsets with the following CSS:
fieldset {
padding: 10px;
border-top: 1px solid silver !important;
}
and for the legends:
legend {
float: left;
}
I have not applied a clearfix or anything to the legends as they are fine in all other browsers. They are the first element within the fieldsets and I was unaware that any float problems would actually cause errors where they float above or on the TOP of the container (of course we have all heard of the common float drop where they show this behavior BELOW the container).
Any suggestions?
Styling
legendelement is painful and non-cross-browser currently. It’s generally easier (though less semantic unfortunately) just to use another element (likeDL/DTorH4) instead oflegend.Most styling problems of
legendcould be worked around by using wrapper forlegendand apply styles to wrapper instead oflegenditself (<div><legend></legend></div>), but this is currently invalid (there is a corresponding [unresolved yet] issue #200 in WG issue tracker).