Re: padded inline boxes and line boxes

ament wrote:

> "vertical padding, border and margin are not supposed to
influence the line
> box."
> Where do you see that in the text?

It's in the CSS2 Recommendation, but limited reading can give
a different impression.

From '8.4.3 Inline formatting context':

    "A line box is always tall enough for all of the boxes it
contains."

But the last line in the section reads:

    "Note that with a small line height, the padding and
borders around text in different lines may overlap."

From '9.6 Line height calculations: the 'line-height' and
'vertical-align' properties':

    "Note that top and bottom margins, borders, and padding
specified for inline elements do not enter into the
calculation of line box heights."

It might be less confusing if the first example sentence were
to read: "A line box is at least as tall as the tallest
line-height (inline elements) or height (replaced elements) of
any elements contained in the box." And second example
sentence might be more specifically-phrased: "Note that if the
sum of the line-height, padding and borders of an inline
element exceeds the height of a line box, the padding and
borders above and below text in different lines may overlap."

David Perrell

Received on Friday, 27 August 1999 16:34:06 UTC