CSS:height
From MDC
[edit] Summary
The height property specifies the height of the content area of an element. The content area is inside the padding, border, and margin of the element.
- Initial value:
auto - Applies to: block level and replaced elements
- Inherited: no
- Percentages: refer to the height of the containing block
- Media:
visual - Computed value:
[edit] Syntax
height: <length> | <percentage> | auto | inherit
[edit] Values
- length : can be in px, cm, in
- percentage : % specified as a percentage of containing block's height
- auto : the browser will calculate and select a height for the specified element
[edit] Examples
table { height: 100%; }
img { height: 200px; }
form { height: auto; }
[edit] Notes
The min-height and max-height properties override height.
[edit] Specifications
[edit] Browser compatibility
| Browser | Lowest Version |
|---|---|
| Internet Explorer | 4 |
| Netscape | 4 |
| Opera | 3.5 |