10.7 Minimum and maximum heights: 'min-height' and 'max-height'

Chapter 10 - Visual formatting model details - 10.7 Minimum and maximum heights: 'min-height' and 'max-height'

Go to the relevant page of the specification.

max-height-001
Max-height using pixels with a minimum minus one value, -1px
The 'max-height' property sets a minimum minus one length value in pixels.
max-height-002
Max-height using pixels with a minimum value, 0px
The 'max-height' property sets a minimum length value in pixels.
max-height-003
Max-height using pixels with a minimum plus one value, 1px
The 'max-height' property sets a minimum plus one length value in pixels.
max-height-004
Max-height using pixels with a negative zero value, -0px
The 'max-height' property sets a negative zero length value in pixels.
max-height-005
Max-height using pixels with a positive zero value, +0px
The 'max-height' property sets a positive zero length value in pixels.
max-height-006
Max-height using pixels with a nominal value, 96px
The 'max-height' property sets a nominal length value in pixels.
max-height-007
Max-height using pixels with a positive nominal value, +96px
The 'max-height' property sets a positive nominal length value in pixels.
max-height-012
Max-height using points with a minimum minus one value, -1pt
The 'max-height' property sets a minimum minus one length value in points.
max-height-013
Max-height using points with a minimum value, 0pt
The 'max-height' property sets a minimum length value in points.
max-height-014
Max-height using points with a minimum plus one value, 1pt
The 'max-height' property sets a minimum plus one length value in points.
max-height-015
Max-height using points with a negative zero value, -0pt
The 'max-height' property sets a negative zero length value in points.
max-height-016
Max-height using points with a positive zero value, +0pt
The 'max-height' property sets a positive zero length value in points.
max-height-017
Max-height using points with a nominal value, 72pt
The 'max-height' property sets a nominal length value in points.
max-height-018
Max-height using points with a positive nominal value, +72pt
The 'max-height' property sets a positive nominal length value in points.
max-height-023
Max-height using picas with a minimum minus one value, -1pc
The 'max-height' property sets a minimum minus one length value in picas.
max-height-024
Max-height using picas with a minimum value, 0pc
The 'max-height' property sets a minimum length value in picas.
max-height-025
Max-height using picas with a minimum plus one value, 1pc
The 'max-height' property sets a minimum plus one length value in picas.
max-height-026
Max-height using picas with a negative zero value, -0pc
The 'max-height' property sets a negative zero length value in picas.
max-height-027
Max-height using picas with a positive zero value, +0pc
The 'max-height' property sets a positive zero length value in picas.
max-height-028
Max-height using picas with a nominal value, 6pc
The 'max-height' property sets a nominal length value in picas.
max-height-029
Max-height using picas with a positive nominal value, +6pc
The 'max-height' property sets a positive nominal length value in picas.
max-height-034
Max-height using centimeters with a minimum minus one value, -1cm
The 'max-height' property sets a minimum minus one length value in centimeters.
max-height-035
Max-height using centimeters with a minimum value, 0cm
The 'max-height' property sets a minimum length value in centimeters.
max-height-036
Max-height using centimeters with a minimum plus one value, 1cm
The 'max-height' property sets a minimum plus one length value in centimeters.
max-height-037
Max-height using centimeters with a negative zero value, -0cm
The 'max-height' property sets a negative zero length value in centimeters.
max-height-038
Max-height using centimeters with a positive zero value, +0cm
The 'max-height' property sets a positive zero length value in centimeters.
max-height-039
Max-height using centimeters with a nominal value, 2.54cm
The 'max-height' property sets a nominal length value in centimeters.
max-height-040
Max-height using centimeters with a positive nominal value, +2.54cm
The 'max-height' property sets a positive nominal length value in centimeters.
max-height-045
Max-height using millimeters with a minimum minus one value, -1mm
The 'max-height' property sets a minimum minus one length value in millimeters.
max-height-046
Max-height using millimeters with a minimum value, 0mm
The 'max-height' property sets a minimum length value in millimeters.
max-height-047
Max-height using millimeters with a minimum plus one value, 1mm
The 'max-height' property sets a minimum plus one length value in millimeters.
max-height-048
Max-height using millimeters with a negative zero value, -0mm
The 'max-height' property sets a negative zero length value in millimeters.
max-height-049
Max-height using millimeters with a positive zero value, +0mm
The 'max-height' property sets a positive zero length value in millimeters.
max-height-050
Max-height using millimeters with a nominal value, 25.4mm
The 'max-height' property sets a nominal length value in millimeters.
max-height-051
Max-height using millimeters with a positive nominal value, +25.4mm
The 'max-height' property sets a positive nominal length value in millimeters.
max-height-056
Max-height using inches with a minimum minus one value, -1in
The 'max-height' property sets a minimum minus one length value in inches.
max-height-057
Max-height using inches with a minimum value, 0in
The 'max-height' property sets a minimum length value in inches.
max-height-058
Max-height using inches with a minimum plus one value, 1in
The 'max-height' property sets a minimum plus one length value in inches.
max-height-059
Max-height using inches with a negative zero value, -0in
The 'max-height' property sets a negative zero length value in inches.
max-height-060
Max-height using inches with a positive zero value, +0in
The 'max-height' property sets a positive zero length value in inches.
max-height-061
Max-height using inches with a nominal value, 3in
The 'max-height' property sets a nominal length value in inches.
max-height-062
Max-height using inches with a positive nominal value, +3in
The 'max-height' property sets a positive nominal length value in inches.
max-height-067 (ahem)
Max-height using 'em' units with a minimum minus one value, -1em
The 'max-height' property sets a minimum minus one length value in 'em' units.
max-height-068 (ahem)
Max-height using 'em' units with a minimum value, 0em
The 'max-height' property sets a minimum length value in 'em' units.
max-height-069 (ahem)
Max-height using 'em' units with a minimum plus one value, 1em
The 'max-height' property sets a minimum plus one length value in 'em' units.
max-height-070 (ahem)
Max-height using 'em' units with a negative zero value, -0em
The 'max-height' property sets a negative zero length value in 'em' units.
max-height-071 (ahem)
Max-height using 'em' units with a positive zero value, +0em
The 'max-height' property sets a positive zero length value in 'em' units.
max-height-072 (ahem)
Max-height using 'em' units with a nominal value, 6em
The 'max-height' property sets a nominal length value in 'em' units.
max-height-073 (ahem)
Max-height using 'em' units with a positive nominal value, +6em
The 'max-height' property sets a positive nominal length value in 'em' units.
max-height-078 (ahem)
Max-height using 'ex' units with a minimum minus one value, -1ex
The 'max-height' property sets a minimum minus one length value in 'ex' units.
max-height-079 (ahem)
Max-height using 'ex' units with a minimum value, 0ex
The 'max-height' property sets a minimum length value in 'ex' units.
max-height-080 (ahem)
Max-height using 'ex' units with a minimum plus one value, 1ex
The 'max-height' property sets a minimum plus one length value in 'ex' units.
max-height-081 (ahem)
Max-height using 'ex' units with a negative zero value, -0ex
The 'max-height' property sets a negative zero length value in 'ex' units.
max-height-082 (ahem)
Max-height using 'ex' units with a positive zero value, +0ex
The 'max-height' property sets a positive zero length value in 'ex' units.
max-height-083 (ahem)
Max-height using 'ex' units with a nominal value, 6ex
The 'max-height' property sets a nominal length value in 'ex' units.
max-height-084 (ahem)
Max-height using 'ex' units with a positive nominal value, +6ex
The 'max-height' property sets a positive nominal length value in 'ex' units.
max-height-089
Max-height using percentages with a minimum minus one value, -1%
The 'max-height' property sets a minimum minus one length value in percentages.
max-height-090
Max-height using percentages with a minimum value, 0%
The 'max-height' property sets a minimum length value in percentages.
max-height-091
Max-height using percentages with a minimum plus one value, 1%
The 'max-height' property sets a minimum plus one length value in percentages.
max-height-092
Max-height using percentages with a negative zero value, -0%
The 'max-height' property sets a negative zero length value in percentages.
max-height-093
Max-height using percentages with a positive zero value, +0%
The 'max-height' property sets a positive zero length value in percentages.
max-height-094
Max-height using percentages with a nominal value, 100%
The 'max-height' property sets a nominal length value in percentages.
max-height-095
Max-height using percentages with a positive nominal value, +100%
The 'max-height' property sets a positive nominal length value in percentages.
max-height-100
Max-height with a negative zero value and no units, -0
The 'max-height' property sets a negative zero length value with no units.
max-height-101
Max-height with a zero value and no units, 0
The 'max-height' property sets a zero length value with no units.
max-height-102
Max-height with a positive zero value and no units, +0
The 'max-height' property sets a positive zero length value with no units.
max-height-103
Max-height set to a value of 'none'
The 'max-height' property applies a value of 'none'.
max-height-104
Max-height set to inherit
The 'max-height' property properly inherits the max-height value of the parent.
max-height-105
max-height - oveflow
The 'max-height' property can restrain the used value of height when the used value of height is greater than the declared max-height and not when it is less than the declared max-height and not when it does not exceed the declared max-height.
max-height-106 (ahem)
max-height - float and overflow
max-height-107 (ahem)
max-height - space for scrollbar
Any space taken up by the scrollbars should be taken out of (subtracted from the dimensions of) the containing block formed by the element with the scrollbars.
max-height-108 (ahem)
max-height - overflow
The max-height property can restrain the used value of height when the used value of height is greater than the declared max-height and not when it is less than the declared max-height and not when it does not exceed the declared max-height.
max-height-109 (ahem)
max-height - overflow
The 'max-height' property can restrain the used value of height when the used value of height is greater than the declared max-height.
max-height-110 (ahem)
max-height - space for scrollbar
Any space taken up by the scrollbars should be taken out of (subtracted from the dimensions of) the containing block formed by the element with the scrollbars.
max-height-111 (ahem)
max-height - float and overflow
The content of the #test-red-overlapped generates an active horizontal scrollbar. The height of such horizontal scrollbar adds itself to the content making it exceed the max-height constraint of 200px. Therefore, such vertical space taken by the horizontal scrollbar must be substracted from the height of the content. An active vertical scrollbar then must be generated to provide access to the equivalent of the height of the horizontal scrollbar.
max-height-applies-to-001 (may)
Max-height applied to elements with 'display' set to 'table-row-group'
The 'max-height' property applies to elements with 'display' set to 'table-row-group'.
max-height-applies-to-002 (may)
Max-height applied to elements with 'display' set to 'table-header-group'
The 'max-height' property applies to elements with 'display' set to 'table-header-group'.
max-height-applies-to-003 (may)
Max-height applied to elements with 'display' set to 'table-footer-group'
The 'max-height' property applies to elements with 'display' set to 'table-footer-group'.
max-height-applies-to-004
Max-height applied to elements with 'display' set to 'table-row'
The 'max-height' property applies to elements with 'display' set to 'table-row'.
max-height-applies-to-005
Max-height applied to elements with 'display' set to 'table-column-group'
The 'max-height' property does not to elements with 'display' set to 'table-column-group'.
max-height-applies-to-006
Max-height applied to elements with 'display' set to 'table-column'
The 'max-height' property does not to elements with 'display' set to 'table-column'.
max-height-applies-to-007 (may)
Max-height applied to elements with 'display' set to 'table-cell'
The 'max-height' property applies to elements with 'display' set to 'table-cell'.
max-height-applies-to-008
Max-height applied to elements with 'display' set to 'inline'
The 'max-height' property does not apply to elements with 'display' set to 'inline'.
max-height-applies-to-009
Max-height applied to elements with 'display' set to 'block'
The 'max-height' property applies to elements with 'display' set to 'block'.
max-height-applies-to-010
Max-height applied to elements with 'display' set to 'list-item'
The 'max-height' property applies to elements with 'display' set to 'list-item'.
max-height-applies-to-012
Max-height applied to elements with 'display' set to 'inline-block'
The 'max-height' property applies to elements with 'display' set to 'inline-block'.
max-height-applies-to-013
Max-height applied to elements with 'display' set to 'table'
The 'max-height' property applies to elements with 'display' set to 'table'.
max-height-applies-to-014
Max-height applied to elements with 'display' set to 'inline-table'
The 'max-height' property applies to elements with 'display' set to 'inline-table'.
max-height-applies-to-015
Max-height applied to elements with 'display' set to 'table-caption'
The 'max-height' property applies to elements with 'display' set to 'table-caption'.
max-height-applies-to-016
Max-Height applied to none
Max-Height can be applied to none elements.
max-height-percentage-001
Max-height percentage is based on containing block
A percentage for 'max-height' is calculated with respect to the 'height' of the generated boxes containing block.
max-height-percentage-002
Percentage 'max-height' with no 'height' on containing block
When the 'height' of the containing block is not specified and the element is not absolutely positioned the percentage is treated as '0' for 'min-height' and 'none' for 'max-height'.
min-height-001
Min-height using pixels with a minimum minus one value, -1px
The 'min-height' property sets a minimum minus one length value in pixels.
min-height-002
Min-height using pixels with a minimum value, 0px
The 'min-height' property sets a minimum length value in pixels.
min-height-003
Min-height using pixels with a minimum plus one value, 1px
The 'min-height' property sets a minimum plus one length value in pixels.
min-height-004
Min-height using pixels with a negative zero value, -0px
The 'min-height' property sets a negative zero length value in pixels.
min-height-005
Min-height using pixels with a positive zero value, +0px
The 'min-height' property sets a positive zero length value in pixels.
min-height-006
Min-height using pixels with a nominal value, 96px
The 'min-height' property sets a nominal length value in pixels.
min-height-007
Min-height using pixels with a positive nominal value, +96px
The 'min-height' property sets a positive nominal length value in pixels.
min-height-012
Min-height using points with a minimum minus one value, -1pt
The 'min-height' property sets a minimum minus one length value in points.
min-height-013
Min-height using points with a minimum value, 0pt
The 'min-height' property sets a minimum length value in points.
min-height-014
Min-height using points with a minimum plus one value, 1pt
The 'min-height' property sets a minimum plus one length value in points.
min-height-015
Min-height using points with a negative zero value, -0pt
The 'min-height' property sets a negative zero length value in points.
min-height-016
Min-height using points with a positive zero value, +0pt
The 'min-height' property sets a positive zero length value in points.
min-height-017
Min-height using points with a nominal value, 72pt
The 'min-height' property sets a nominal length value in points.
min-height-018
Min-height using points with a positive nominal value, +72pt
The 'min-height' property sets a positive nominal length value in points.
min-height-023
Min-height using picas with a minimum minus one value, -1pc
The 'min-height' property sets a minimum minus one length value in picas.
min-height-024
Min-height using picas with a minimum value, 0pc
The 'min-height' property sets a minimum length value in picas.
min-height-025
Min-height using picas with a minimum plus one value, 1pc
The 'min-height' property sets a minimum plus one length value in picas.
min-height-026
Min-height using picas with a negative zero value, -0pc
The 'min-height' property sets a negative zero length value in picas.
min-height-027
Min-height using picas with a positive zero value, +0pc
The 'min-height' property sets a positive zero length value in picas.
min-height-028
Min-height using picas with a nominal value, 6pc
The 'min-height' property sets a nominal length value in picas.
min-height-029
Min-height using picas with a positive nominal value, +6pc
The 'min-height' property sets a positive nominal length value in picas.
min-height-034
Min-height using centimeters with a minimum minus one value, -1cm
The 'min-height' property sets a minimum minus one length value in centimeters.
min-height-035
Min-height using centimeters with a minimum value, 0cm
The 'min-height' property sets a minimum length value in centimeters.
min-height-036
Min-height using centimeters with a minimum plus one value, 1cm
The 'min-height' property sets a minimum plus one length value in centimeters.
min-height-037
Min-height using centimeters with a negative zero value, -0cm
The 'min-height' property sets a negative zero length value in centimeters.
min-height-038
Min-height using centimeters with a positive zero value, +0cm
The 'min-height' property sets a positive zero length value in centimeters.
min-height-039
Min-height using centimeters with a nominal value, 2.54cm
The 'min-height' property sets a nominal length value in centimeters.
min-height-040
Min-height using centimeters with a positive nominal value, +2.54cm
The 'min-height' property sets a positive nominal length value in centimeters.
min-height-045
Min-height using millimeters with a minimum minus one value, -1mm
The 'min-height' property sets a minimum minus one length value in millimeters.
min-height-046
Min-height using millimeters with a minimum value, 0mm
The 'min-height' property sets a minimum length value in millimeters.
min-height-047
Min-height using millimeters with a minimum plus one value, 1mm
The 'min-height' property sets a minimum plus one length value in millimeters.
min-height-048
Min-height using millimeters with a negative zero value, -0mm
The 'min-height' property sets a negative zero length value in millimeters.
min-height-049
Min-height using millimeters with a positive zero value, +0mm
The 'min-height' property sets a positive zero length value in millimeters.
min-height-050
Min-height using millimeters with a nominal value, 25.4mm
The 'min-height' property sets a nominal length value in millimeters.
min-height-051
Min-height using millimeters with a positive nominal value, +25.4mm
The 'min-height' property sets a positive nominal length value in millimeters.
min-height-056
Min-height using inches with a minimum minus one value, -1in
The 'min-height' property sets a minimum minus one length value in inches.
min-height-057
Min-height using inches with a minimum value, 0in
The 'min-height' property sets a minimum length value in inches.
min-height-058
Min-height using inches with a minimum plus one value, 1in
The 'min-height' property sets a minimum plus one length value in inches.
min-height-059
Min-height using inches with a negative zero value, -0in
The 'min-height' property sets a negative zero length value in inches.
min-height-060
Min-height using inches with a positive zero value, +0in
The 'min-height' property sets a positive zero length value in inches.
min-height-061
Min-height using inches with a nominal value, 3in
The 'min-height' property sets a nominal length value in inches.
min-height-062
Min-height using inches with a positive nominal value, +3in
The 'min-height' property sets a positive nominal length value in inches.
min-height-067 (ahem)
Min-height using 'em' units with a minimum minus one value, -1em
The 'min-height' property sets a minimum minus one length value in 'em' units.
min-height-068 (ahem)
Min-height using 'em' units with a minimum value, 0em
The 'min-height' property sets a minimum length value in 'em' units.
min-height-069 (ahem)
Min-height using 'em' units with a minimum plus one value, 1em
The 'min-height' property sets a minimum plus one length value in 'em' units.
min-height-070 (ahem)
Min-height using 'em' units with a negative zero value, -0em
The 'min-height' property sets a negative zero length value in 'em' units.
min-height-071 (ahem)
Min-height using 'em' units with a positive zero value, +0em
The 'min-height' property sets a positive zero length value in 'em' units.
min-height-072 (ahem)
Min-height using 'em' units with a nominal value, 6em
The 'min-height' property sets a nominal length value in 'em' units.
min-height-073 (ahem)
Min-height using 'em' units with a positive nominal value, +6em
The 'min-height' property sets a positive nominal length value in 'em' units.
min-height-078 (ahem)
Min-height using 'ex' units with a minimum minus one value, -1ex
The 'min-height' property sets a minimum minus one length value in 'ex' units.
min-height-079 (ahem)
Min-height using 'ex' units with a minimum value, 0ex
The 'min-height' property sets a minimum length value in 'ex' units.
min-height-080 (ahem)
Min-height using 'ex' units with a minimum plus one value, 1ex
The 'min-height' property sets a minimum plus one length value in 'ex' units.
min-height-081 (ahem)
Min-height using 'ex' units with a negative zero value, -0ex
The 'min-height' property sets a negative zero length value in 'ex' units.
min-height-082 (ahem)
Min-height using 'ex' units with a positive zero value, +0ex
The 'min-height' property sets a positive zero length value in 'ex' units.
min-height-083 (ahem)
Min-height using 'ex' units with a nominal value, 6ex
The 'min-height' property sets a nominal length value in 'ex' units.
min-height-084 (ahem)
Min-height using 'ex' units with a positive nominal value, +6ex
The 'min-height' property sets a positive nominal length value in 'ex' units.
min-height-089
Min-height using percentages with a minimum minus one value, -1%
The 'min-height' property sets a minimum minus one length value in percentages.
min-height-090
Min-height using percentages with a minimum value, 0%
The 'min-height' property sets a minimum length value in percentages.
min-height-091
Min-height using percentages with a minimum plus one value, 1%
The 'min-height' property sets a minimum plus one length value in percentages.
min-height-092
Min-height using percentages with a negative zero value, -0%
The 'min-height' property sets a negative zero length value in percentages.
min-height-093
Min-height using percentages with a positive zero value, +0%
The 'min-height' property sets a positive zero length value in percentages.
min-height-094
Min-height using percentages with a nominal value, 100%
The 'min-height' property sets a nominal length value in percentages.
min-height-095
Min-height using percentages with a positive nominal value, +100%
The 'min-height' property sets a positive nominal length value in percentages.
min-height-100
Min-height with a negative zero value and no units, -0
The 'min-height' property sets a negative zero length value with no units.
min-height-101
Min-height with a zero value and no units, 0
The 'min-height' property sets a zero length value with no units.
min-height-102
Min-height with a positive zero value and no units, +0
The 'min-height' property sets a positive zero length value with no units.
min-height-103
Min-height set to 'inherit'
The 'min-height' property properly inherits the min-height value of the parent.
min-height-104 (ahem)
min-height - space for scrollbar
Any space taken up by the scrollbars should be taken out of (subtracted from the dimensions of) the containing block formed by the element with the scrollbars.
min-height-105 (ahem)
min-height - space for scrollbar
Any space taken up by the scrollbars should be taken out of (subtracted from the dimensions of) the containing block formed by the element with the scrollbars.
min-height-106 (ahem)
min-height - float and overflow
'min-height' specifies a fixed minimum used height. If the element requires an horizontal scrollbar, then the horizontal scrollbar height should be subtracted from the height of its containing block so that the resulting used height continues to honor the declared min-height.
min-height-111
Basic min-height test
min-height-112
Basic min-height test (with overflow:hidden)
min-height-113
Basic min-height test (with overflow:scroll)
min-height-applies-to-001 (may)
Min-height applied to elements with 'display' set to 'table-row-group'
The 'min-height' property applies to elements with 'display' set to 'table-row-group'.
min-height-applies-to-002 (may)
Min-height applied to elements with 'display' set to 'table-header-group'
The 'min-height' property applies to elements with 'display' set to 'table-header-group'.
min-height-applies-to-003 (may)
Min-height applied to elements with 'display' set to 'table-footer-group'
The 'min-height' property applies to elements with 'display' set to 'table-footer-group'.
min-height-applies-to-004
Min-height applied to elements with 'display' set to 'table-row'
The 'min-height' property applies to elements with 'display' set to 'table-row'.
min-height-applies-to-005
Min-height applied to elements with 'display' set to 'table-column-group'
The 'min-height' property does not to elements with 'display' set to 'table-column-group'.
min-height-applies-to-006
Min-height applied to elements with 'display' set to 'table-column'
The 'min-height' property does not to elements with 'display' set to 'table-column'.
min-height-applies-to-007 (may)
Min-height applied to elements with 'display' set to 'table-cell'
The 'min-height' property applies to elements with 'display' set to 'table-cell'.
min-height-applies-to-008
Min-height applied to elements with 'display' set to 'inline'
The 'min-height' property does not apply to elements with 'display' set to 'inline'.
min-height-applies-to-009
Min-height applied to elements with 'display' set to 'block'
The 'min-height' property applies to elements with 'display' set to 'block'.
min-height-applies-to-010
Min-height applied to elements with 'display' set to 'list-item'
The 'min-height' property applies to elements with 'display' set to 'list-item'.
min-height-applies-to-012
Min-height applied to elements with 'display' set to 'inline-block'
The 'min-height' property applies to elements with 'display' set to 'inline-block'.
min-height-applies-to-013
Min-height applied to elements with 'display' set to 'table'
The 'min-height' property applies to elements with 'display' set to 'table'.
min-height-applies-to-014
Min-height applied to elements with 'display' set to 'inline-table'
The 'min-height' property applies to elements with 'display' set to 'inline-table'.
min-height-applies-to-015
Min-height applied to elements with 'display' set to 'table-caption'
The 'min-height' property applies to elements with 'display' set to 'table-caption'.
min-height-percentage-001
Min-height percentage is based on containing block
A percentage for 'min-height' is calculated with respect to the 'height' of the generated boxes containing block.
min-height-percentage-002
Percentage 'min-height' with no 'height' on containing block
When the 'height' of the containing block is not specified and the element is not absolutely positioned the percentage is treated as '0' for 'min-height' and 'none' for 'max-height'.
min-height-percentage-003
min-height - 100% of the initial containing block's height
The initial containing block has the dimensions of the viewport. A percentage height on the root element is relative to the initial containing block. A 'min-height: 100%;' of the document root element should use all of the document root element's height. A percentage for 'min-height' is calculated with respect to the height of the generated box's containing block.