MudGuard: Woran liegts ?

Beitrag lesen

Hi,

Hallo Forum,

folgende CSS-Definition:

p{
margin:0;
line-height: 20px;
margin-bottom: 20px;
}

.small_text{
font-size: 9px;
}

<p>Bla blub <span class="small_text">klein</span> bla blub</p>

Was nicht greift ist:
.small_text{
font-size: 9px;
line-height: 9px;
}

Das greift durchaus.
Aber nicht so, wie Du das gerne hättest.

On a block-level, table-cell, table-caption or inline-block element whose content is composed of inline-level elements, 'line-height' specifies the minimal height of line boxes within the element. The minimum height consists of a minimum height above the block's baseline and a minimum depth below it, exactly as if each line box starts with a zero-width inline box with the block's font and line height properties (what TEX calls a "strut").

On an inline-level element, 'line-height' specifies the height that is used in the calculation of the line box height (except for inline replaced elements, where the height of the box is given by the 'height' property).

Die _minimale_ line-height im Block (p-Element) ist nach wie vor 20px.

cu,
Andreas

--
Warum nennt sich Andreas hier MudGuard?
O o ostern ...
Fachfragen per Mail sind frech, werden ignoriert. Das Forum existiert.