22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Value:<br />

Initial:<br />

Applies to:<br />

| | none | inherit<br />

none<br />

all elements except non-replaced inline elements and table<br />

elements<br />

no<br />

Inherited:<br />

Percentages: refer to height of containing block<br />

Media: visual<br />

These two properties allow authors to constrain box heights to a certain range.<br />

Values have the following meanings:<br />

<br />

Specifies a fixed minimum or maximum computed height.<br />

<br />

Specifies a percentage for determining the computed value. The percentage<br />

is calculated with respect to the height of the generated box’s containing<br />

block [p. 96] . If the height of the containing block is not specified explicitly<br />

(i.e., it depends on content height), the percentage value is interpreted like<br />

’auto’.<br />

none<br />

(Only on ’max-height’) No limit on the height of the box.<br />

The following algorithm describes how the two properties influence the<br />

computed value [p. 70] of the ’height’ property:<br />

1. The height is computed (without ’min-height’ and ’max-height’) following the<br />

rules under "Computing heights and margins" [p. 138] above.<br />

2. If the computed value of ’min-height’ is greater than the value of<br />

’max-height’, ’max-height’ is set to the value of ’min-height’.<br />

3. If the computed height is greater than ’max-height’, the rules above [p. 138]<br />

are applied again, but this time using the value of ’max-height’ as the specified<br />

value for ’height’.<br />

4. If the computed height is smaller than ’min-height’, the rules above [p. 138]<br />

are applied again, but this time using the value of ’min-height’ as the specified<br />

value for ’height’.<br />

10.8 Line height calculations: the ’line-height’<br />

and ’vertical-align’ properties<br />

As described in the section on inline formatting contexts [p. 105] , user agents<br />

flow inline boxes into a vertical stack of line boxes [p. 105] . The height of a line<br />

box is determined as follows:<br />

1. The height of each inline box in the line box is calculated (see "Computing<br />

heights and margins" [p. 138] and the ’line-height’ property).<br />

2. The inline boxes are aligned vertically according to their ’vertical-align’ property.<br />

3. The line box height is the distance between the uppermost box top and the<br />

lowermost box bottom.<br />

141

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!