CSS:max-height
From MDC
[edit] Summary
The max-height property is used to set the maximum height of a given element.
It prevents the used value of the height property from becoming larger than the value specified for max-height.
- Initial value:
none - Applies to: block level and replaced elements
- Inherited: no
- Percentages: refer to the height of the containing block
- Media:
visual - Computed value:
[edit] Syntax
max-height: <length> | <percentage>
[edit] Values
- none : the
heighthas no maximum value - length : can be in px, cm, in
- percentage : % specified as a percentage of containing block's height
[edit] Examples
View Live Examples (FIXME)
table { max-height: 75%; }
form { max-height: none; }
[edit] Notes
max-height overrides height, but min-height overrides max-height.
[edit] Specifications
[edit] Browser compatibility
| Browser | Lowest Version |
|---|---|
| Internet Explorer | 6 |
| Netscape | 6 |
| Opera | 3.5 |