Philippe Wittenbergh wrote: > On Jul 23, 2008, at 9:57 PM, Sharon Go wrote: >> So I added the h2. And for some weird reason, FF dumps the h2 >> *outside* the dt!! >> You can see an example here: >> http://goxsha.googlepages.com/dl-test-file.htm > Maybe Firefox isn't _that_ wrong: > http://validator.w3.org/check?uri=http%3A%2F%2Fgoxsha.googlepages.com%2Fdl-test-file.htm&charset=%28detect+automatically%29&doctype=Inline&group=0&ss=1 >> I know that the dt tag of a definitions list is an inline element, > Most if not all browsers treat the dt as 'display:block' by default. > Philippe
Philippe is right; most browsers treat the DT as a type of block element, almost like an inline element with 100% width applied (much like the legend element). I know it's not you and having to answer to the whims of someone in authority (be it boss or client) can be problematic, but they are asking you to create invalid code...which in an of itself can be fine if the reasons are strong enough to do so. Unfortunately, invalid code is not rendered consistently across browsers because there are no guidelines for how to style things that don't meet the guidelines (how's /that/ for a mouthful?). Even after I removed all the errors from the page (including the dangling </dd>), I was unable to get FF3 to put the H2 back into the DT and I tried everything I could think of. This could be hacked to give the appearance of being inside the DT, but only for elements with known dimensions (negative margining, absolute positioning and so on). Hopefully, the "higher ups" understand the unpredictable nature of invalid code and will allow you to do something else instead. --Bill -- /** * Bill Brown * TheHolierGrail.com & MacNimble.com * From dot concept...to dot com...since 1999. ***********************************************/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/