Simple solution based on findPos() from Quirks Mode. Basically you have to recursively climb the tree from the target element adding the offset positions, so that whatever model the browser uses for offsetParent (which is where the differences are), the results are the same.