Skip to main content
offsetParent property

[This documentation is preliminary and is subject to change.]

Retrieves a reference to the container object that defines the IHTMLElement::offsetTop and IHTMLElement::offsetLeft properties of the object.


HRESULT value = object.get_offsetParent(IHTMLElement** p);

Property values

Type: Object

the container object.


Most of the time the IHTMLElement::offsetParent property returns the body object.

Note  In Microsoft Internet Explorer 5, the IHTMLElement::offsetParent property returns the table object for the td object; in Microsoft Internet Explorer 4.0 it returns the tr object. You can use the parentElement property to retrieve the immediate container of the table cell.

See also

Measuring Element Dimension and Location with CSSOM in Internet Explorer 9



Build date: 6/12/2012