The height of the element in pixels. This value is read-only but for some objects such as images the height property should be used instead if you need to modify the physical size of the item. The changes will be reflected in this property but you cannot make the changes by altering the value of this property from your script.
The value in this property is not supposed to include any padding, border or margin widths.
Although the name of this property implies its value is related to a parent object, in fact it is a measure of the element's height and the parentage has no bearing on that whatsoever.
The offset properties are implemented very inconsistently across platforms and versions of MSIE. Use them with caution. In any case, they are available for read access only so they are of limited use in position control.
MSIE 4 for Windows incorrectly includes padding widths around the object when calculating the size value in here. The correct value will be yielded on both Macintosh and Windows versions of MSIE 4 if you don't specify any padding at all.
See also: | Element object, Element.offsetWidth |
Prev | Home | Next |
Element.normalize() | Up | Element.offsetLeft |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |