[ Pobierz całość w formacie PDF ]

’margin-top’ and ’margin-bottom’ to 0, and solve for ’top’
5. ’height’ is ’auto’, ’top’ and ’bottom’ are not ’auto’, then ’auto’ values for
’margin-top’ and ’margin-bottom’ are set to 0 and solve for ’height’
6. ’bottom’ is ’auto’, ’top’ and ’height’ are not ’auto’, then set ’auto’ values for
’margin-top’ and ’margin-bottom’ to 0 and solve for ’bottom’
10.6.5 Absolutely positioned, replaced elements
This situation is similar to the previous one, except that the element has an intrinsic
[p. 30] height. The sequence of substitutions is now:
1. The computed value of ’height’ is determined as for inline replaced elements
[p. 148] .
2. If ’top’ has the value ’auto’, replace it with the element’s static position.
3. If ’bottom’ is ’auto’, replace any ’auto’ on ’margin-top’ or ’margin-bottom’ with ’0’.
4. If at this point both ’margin-top’ and ’margin-bottom’ are still ’auto’, solve the
equation under the extra constraint that the two margins must get equal values.
5. If at this point there is only one ’auto’ left, solve the equation for that value.
6. If at this point the values are over-constrained, ignore the value for ’bottom’ and
solve for that value.
10.7 Minimum and maximum heights: ’min-height’ and
’max-height’
2 Aug 2002 21:33
150
Visual formatting model details
It is sometimes useful to constrain the height of elements to a certain range. Two
properties offer this functionality:
’min-height’
Value:
length | percentage | inherit
Initial:
Applies to:
all elements except non-replaced inline elements and table
elements
Inherited:
no
Percentages: refer to height of containing block
Media:
visual
’max-height’
Value:
length | percentage | none | inherit
Initial:
none
Applies to:
all elements except non-replaced inline elements and table
elements
Inherited:
no
Percentages: refer to height of containing block
Media:
visual
These two properties allow authors to constrain box heights to a certain range.
Values have the following meanings:
length
Specifies a fixed minimum or maximum computed height.
percentage
Specifies a percentage for determining the computed value. The percentage is
calculated with respect to the height of the generated box’s containing block
[p. 100] . If the height of the containing block is not specified explicitly (i.e., it
depends on content height), the percentage value is interpreted like ’auto’.
none
(Only on ’max-height’) No limit on the height of the box.
The following algorithm describes how the two properties influence the computed
value [p. 74] of the ’height’ property:
1. The height is computed (without ’min-height’ and ’max-height’) following the
rules under "Computing heights and margins" [p. 148] above.
2. If the computed value of ’min-height’ is greater than the value of ’max-height’,
’max-height’ is set to the value of ’min-height’.
3. If the computed height is greater than ’max-height’, the rules above [p. 148] are
applied again, but this time using the value of ’max-height’ as the specified
value for ’height’.
4. If the computed height is smaller than ’min-height’, the rules above [p. 148] are
151
2 Aug 2002 21:33
Visual formatting model details
applied again, but this time using the value of ’min-height’ as the specified value
for ’height’.
10.8 Line height calculations: the ’line-height’ and
’vertical-align’ properties
As described in the section on inline formatting contexts [p. 109] , user agents flow
inline boxes into a vertical stack of line boxes [p. 109] . The height of a line box is
determined as follows:
1. The height of each inline box in the line box is calculated (see "Computing
heights and margins" [p. 148] and the ’line-height’ property).
2. The inline boxes are aligned vertically according to their ’vertical-align’ property.
3. The line box height is the distance between the uppermost box top and the
lowermost box bottom.
Empty inline elements generate empty inline boxes, but these boxes still have [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • leike.pev.pl