- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 15 Jul 2009 17:31:59 -0500
On Wed, Jul 15, 2009 at 5:13 PM, Aryeh Gregor<Simetrical+w3c at gmail.com> wrote: > On Wed, Jul 15, 2009 at 6:07 PM, Nils Dagsson > Moskopp<nils-dagsson-moskopp at dieweltistgarnichtso.net> wrote: >> Where is <legend> element styling lacking currently ? > > The element can't be styled in either Firefox 3.5 or recent WebKit > because, according to my testing, it simply doesn't exist in the DOM. > Any <legend> that's not in a <fieldset> is just ignored during > parsing, apparently. I'm confused by this - what exact FF build did you test in? When I try it in the current public 3.5, I get <legend> autowrapping itself in a <fieldset>. http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Ctitle%3ETest%3C%2Ftitle%3E%0A%3Cfigure%3E%0A%20%20Test%20figure%0A%20%20%3Clegend%3Etest%20legend%3C%2Flegend%3E%0A%3C%2Ffigure%3E On the note of <legend> styling, currently a legend-in-fieldset isn't handled by the standard CSS renderer *at all* in FF, last I heard, due to the magic inherent in its display: * automatically positioning itself on top of the <fieldset>'s border without using abspos (the fieldset would need to be relpos or similar to allow this to work) regardless of where in the <fieldset> the <legend> appears (this precludes use of margin to pull it upwards, because it might not appear as the first child). * hiding the border of the fieldset behind it without hiding the background of the fieldset, or any borders or padding of any lower-layer elements. ~TJ
Received on Wednesday, 15 July 2009 15:31:59 UTC