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.

 

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.

Valid HTML 4.01!