Mozilla.com

  1. MDC
  2. Main Page
  3. DOM
  4. element.offsetParent
Table of contents
  1. 1. Summary
  2. 2. Syntax
  3. 3. Parameters
  4. 4. Specification
Table of contents
  1. 1. Summary
  2. 2. Syntax
  3. 3. Parameters
  4. 4. Specification

« Gecko DOM Reference

Summary

offsetParent returns a reference to the object which is the closest (nearest in the containment hierarchy) positioned containing element. If the element is non-positioned, the root element (html in standards compliant mode; body in quirks rendering mode) is the offsetParent. offsetParent returns null when the element has style.display set to "none".

Syntax

parentObj = element.offsetParent

Parameters

  • parentObj is an object reference to the element in which the current element is offset.

Specification

DOM Level 0. Not part of specification.

Languages

Page last modified 05:15, 21 Apr 2008 by Johnjbarton

Files (0)