CSS property: height

Description

Specifies the height of the content area, padding area or border area (depending on box-sizing) of certain boxes.

Syntax

height: <length> | <percentage> | auto;

Values

<length>
Specifies the height of the content area using a length unit.
<percentage>
Specifies a percentage height. The percentage is calculated with respect to the height of the generated box's containing block. If the containing block's height depends on this element's height, then the resulting layout is undefined in CSS3.
auto (by default)
The height depends on the values of other properties.

Versions

Examples

p {
    height: 100px;
}