height

The height CSS property specifies the height of an element. By default, the property defines the height of the content area. If box-sizing is set to border-box, however, it instead determines the height of the border area.

Example

Initial value auto
Applies to all elements but non-replaced inline elements, table columns, and column groups

Syntax

  
height: 180px;
  

Values

Defines the height as an absolute value.
Defines the height as a percentage of the containing block's height.
The browser will calculate and select a height for the specified element.
The intrinsic preferred height.
The intrinsic minimum height.
Uses the fit-content formula with the available space replaced by the specified argument, i.e. min(max-content, max(min-content, )).

Browser support

height1121471
fit-content46793311
max-content4679664411
min-content4679664411
stretch2879159

We use cookies to improve your experience. Learn more in our Privacy policy.

×