/

HTML / CSS / JavaScript Tutorial

CSS Property: height

[this page | pdf | back links]

The CSS (CSS1) height property indicates the height of an element (excluding padding, borders and margins). It is overridden by the min-height or max-height properties, if either of them are present.

 

Valid property values (other than inherit and initial) are:

 

Value

Description

length

Height as a CSS length (px, cm, …)

%

Height of element defined as a percentage of height of its containing block

auto

(default value). Browser determines height

 

Default Value:

auto

JavaScript syntax:

e.g. object.style.height="200px"

Inherited:

No

Animatable:

Yes

 


NAVIGATION LINKS
Contents | Prev | Next | CSS Properties


Desktop view | Switch to Mobile