The height property specifies the content height of boxes generated by block-level, inline-block, and replaced elements.


height: <length> | <percentage> | auto | inherit
Initial: auto
Applies To: all elements but non-replaced inline elements, table columns, and column groups
Inherited: no
Percentages: refer to height of containing block
Media: visual


height: value
Value Description
auto Depends on the values of other properties
length Height measurement: em | ex | px | in | cm | mm | pt | pc
percentage Height percentage calculated with respect to the height of the containing block


[window.]document.getElementById("element-id").style.height = "height";

Example | auto

Example | length

Example | percentage

Example | DOM


W3C Cascading Style Sheets, level 1

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification