The definitions for offsetParent, offsetLeft and offsetTop provided
at MSDN2 clearly indicate that if an object has no
offsetParent, then its offsetLeft value must be 0 and its
offsetTop value must be 0. If an object has an offsetLeft value of
0 and an offsetTop value of 0, then its offsetParent attribute must
return null. Otherwise the definitions no longer make sense.
The offsetLeft, offsetTop and offsetParent definitions
provided at MSDN2 are circular, mutually inter-dependent on each
other. Therefore, the slightlest implementation bug on one of them
impacts the understanding (and implementation) of the others.
offsetLeft: "Retrieves the calculated left position of the object
relative to the layout or coordinate parent, as specified by the
offsetParent property." from offsetLeft at
MSDN
offsetParent: "Retrieves a reference to the container object that
defines the offsetTop and offsetLeft properties of the object." from
offsetParent
at MSDN
offsetTop: "Retrieves the calculated top position of the object
relative to the layout or coordinate parent, as specified by the
offsetParent property." from offsetTop at
MSDN
W3C
CSSOM View Module, on offsetParent, offsetTop, offsetLeft properties
also contradicts the returned values by Internet Explorer 7 and
Internet Explorer 8 beta 1 in this testcase as the HTML body element
can not have an offsetParent and must have an offsetLeft value of 0
and must have an offsetTop value of 0.