Search within TutorialsPark

CSS height Property


To specify the height of the element.


Definition and Notes.

1. The CSS height property is used to define the height of an element's content area, outside of which padding, borders, and margins are added.

2.This property is ignored for inline nonreplaced element.Also, negative values are not allowed


Syntax:

CSS height property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note-The values of min-height and max-height can override the values of height.

Property Values

Value Description
auto Leaves it to the browser to define the height of the element
length To values of height are specified using length values.
% The values of height are specified in percentage values.
inherit To value for height is inherited from the parent element

Specifications

Specs Value
Name height
Value <length> <percentage> | auto | inherit
Initial Value auto
Applies to Block level and replaced elements
Javascript syntax object.style.height="100px"
Inherited No
Computed Value Refer to the height of the containing block
Browser Support internetexplorer safari firefox opera chrome

Related Examples.