You're in for a long painful journey.
Couldn't agree more.
It seems CSSOM views has been pushed through to WD status. MSIE 8 has
implemented offsetParent to more closely match CSSOM Views' definition.
As a result, IE6, IE7, and IE8 all have a different implementation of
offset*.
LOL. Well, at least IE8 defaults to "IE7 mode." That's what I heard
anyway (I refuse to look at it at this point.)
Mozilla, Opera, Safari all have implementations of offsetParent that
vary between versions.
Yes, and it takes a heart-stopping amount of feature testing to deal
with it all. IIRC, most of the libraries sniff browsers for this,
which would make for some interesting code if it were anywhere near
comprehensive (e.g. if version xyz of agent abc, substract d and
multiply by the minor version number.)
Mozilla subtracts border on the body element.
Opera <= 9.2 - parent border widths are included in offsetTop.
I remember that BS (not that I have to as I wrote a test for it.)
They finally fixed it? I know they added getBoundingClientRect too
and I am interested to see how close they came to IE's rendition.
- body offsetTop is inherited to children's offsetTop
I don't follow you there.
Safari 2.0.4 may double offsetTop of relatively positioned offsetParent.
Yecch. Don't think I ever stumbled into that one.
On a related note, I recently took your advice about putting
position:relative on the body. That context drastically simplifies
positioning code, drag and drop, etc. and got rid of the one DIV in my
template that couldn't be justified semantically. I always hated that
style when writing widgets for any Web page (for obvious reasons), but
think it is quite useful when writing scripts for documents I
control. Heard of any backward compatibility issues with that?