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:
> Maybe Firefox isn't _that_ wrong:
>> 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 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
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 Brown
* TheHolierGrail.com & MacNimble.com
* From dot concept...to dot com...since 1999.
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/