Gets the height of the object.
HRESULT IHTMLCurrentStyle::get_height(VARIANT *p);
- Pointer to a variable of type VARIANT of type VT_BSTR that receives one of the values listed in Possible Values.
auto Default. height Floating-point number followed by an absolute units designator (
pc) or a relative units designator (
px). For more information about the supported length units, see CSS Length Units Reference.
percentage Integer followed by a percent sign (%). The value is a percentage of the height of the parent object, which must be specified explicitly. Negative values are not allowed.
Returns S_OK if successful, or an error value otherwise.
If you specify the IHTMLCurrentStyle::height property of an img object but not the IHTMLStyle::width property, the width is proportional to the height according to the dimensions of the image source file.
As of Microsoft Internet Explorer 6, when you use the !DOCTYPE declaration to specify standards-compliant mode, this property specifies the distance between the top and bottom edges of the content box—that is, within the IHTMLStyle::padding.
When the !DOCTYPE declaration does not specify standards-compliant mode, and with earlier versions of Windows Internet Explorer, this property includes the object's content box, plus the values of the following properties: IHTMLStyle::borderTop, IHTMLStyle::borderBottom, IHTMLStyle::paddingTop, and IHTMLStyle::paddingBottom. Subtracting the sum of the values of these properties from the value of the IHTMLCurrentStyle::height property equals the height of the parent object's content box.
CSS Enhancements in Internet Explorer 6, Measuring Element Dimension and Location with CSSOM in Internet Explorer 9