Visit Mozilla.org

DOM:element.offsetHeight

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

Height of an element relative to the element's offsetParent.

[edit] Syntax and values

var intElemOffsetHeight = document.getElementById(id_attribute_value).offsetHeight;

intElemOffsetHeight is a variable storing an integer corresponding to the offsetHeight pixel value of the element. offsetHeight is a read-only property.

[edit] Description

Typically, an element's offsetHeight is a measurement which includes the element borders, the element vertical padding, the element horizontal scrollbar (if present, if rendered) and the element CSS height.

For the document body object, the measurement includes total linear content height instead of the element CSS height. Floated elements extending below other linear content are ignored.

[edit] Example

padding-top

Gentle, individualistic and very loyal, Birman cats fall between Siamese and Persian in character. If you admire cats that are non aggressive, that enjoy being with humans and tend to be on the quiet side, you may well find that Birman cats are just the felines for you.

Image:BirmanCat.jpgAll Birmans have colorpointed features, dark coloration of the face, ears, legs and tail.

Cat image and text coming from www.best-cat-art.com

padding-bottom

LeftTopRightBottommargin-topmargin-bottomborder-topborder-bottom

Image:offsetHeight.png

[edit] Specification

offsetHeight is part of the MSIE's DHTML object model. offsetHeight is not part of any W3C specification or technical recommendation.

[edit] Notes

offsetHeight is a property of the DHTML object model which was first introduced by MSIE. It is sometimes referred to as an element's physical/graphical dimensions, or an element's border-box height.

[edit] References

[edit] See Also