This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

height

Summary

Sets the height of an element.

Property of css/cssom/CSSStyleDeclaration/CSSStyleDeclarationcss/cssom/CSSStyleDeclaration/CSSStyleDeclaration

Syntax

var result = declaration.height;
declaration.height = value;

Return Value

Returns an object of type StringString

Examples

Sets the height of paragraph elements to 200 px.

p { height: 200 px; }

Notes

Remarks

The height of the rectangle can also be calculated by subtracting the value of the top property from the value of the bottom property.

Syntax

Standards information

See also

Related articles

CSSOM

Attributions