Export (0) Print
Expand All

offsetTop property

Retrieves the calculated top position of the object relative to the layout or coordinate parent, as specified by the IHTMLElement::offsetParent property.

Syntax

HRESULT value = object.get_offsetTop(* p);

Property values

Type: long

the top position, in pixels.

Remarks

You can determine the location, width, and height of an object by using a combination of the IHTMLElement::offsetLeft, IHTMLElement::offsetTop, IHTMLElement::offsetHeight, and IHTMLElement::offsetWidth properties. These numeric properties specify the physical coordinates and dimensions of the object relative to the object's offset parent.

You can determine the location, width, and height of an object by using a combination of the IHTMLElement::offsetLeft, IHTMLElement::offsetTop, IHTMLElement::offsetHeight, and IHTMLElement::offsetWidth properties. These numeric properties specify the physical coordinates and dimensions of the object relative to the object's offset parent.

For more information about how to access the dimension and location of objects on the page through the Dynamic HTML (DHTML) Document Object Model (DOM), see Measuring Element Dimension and Location with CSSOM in Internet Explorer 9.

See also

Reference
IHTMLTextRangeMetrics::boundingHeight
IHTMLTextRangeMetrics::boundingLeft
IHTMLTextRangeMetrics::boundingTop
IHTMLTextRangeMetrics::boundingWidth

 

 

Community Additions

ADD
Show:
© 2014 Microsoft