On Monday 2010-01-04 15:22 +0100, Ingo Chao wrote:
> In Strict mode, the red span encloses the text - in transitional mode,
> it dosn't.

What's happening here is that you have one inline-block within
another, and it is vertical-align:baseline.  However, you've set
line-height and height on the inner inline block so that its
baseline is actually below the bottom of the block.

In standards mode, Firefox follows the inline box model correctly,
and the line box in the outer inline-block includes both the extents
required by its font-size and line-height and (baseline-aligned to
those extents) the extents required by the inner inline-block:

 root inline box for outer . inner inline-block
            12px font size . 48px line-height / 12px font-size / 24px height
                           . ^
                           . |
                           . |     24px height affects inline box
                           . |     model outside it, but baseline
                           . |     is about 27px from the top
                         ^ . |
                         | . v
                  ______ | . ______________
                         v .

In quirks mode and almost standards mode, we don't force the
inclusion in the inline box model of things that don't contain text
of their own, such as the root inline box (a.k.a. strut) for the
outer inline-block.

This is one of the quirks listed in
https://developer.mozilla.org/En/Mozilla_Quirks_Mode_Behavior
(created to fix bug 24186).

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
______________________________________________________________________
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/

Reply via email to