Moin,
Das ganze dürfte aber mittels in der Seite vorhandenem JavaScript genauso funktionieren. Jedenfalls möchte ich gerne die absolute Position aller Elemente auf der Seite haben.
absolute positionen hast du nur bbei absolut positionierten elementen, ansonsten bekommst du über solche dinger wie
<cite: msdn.microsoft.com>
.offsetHeight
Retrieves the height of the object relative to the layout or coordinate parent, as specified by the offsetParent property.
.offsetLeft
Retrieves the calculated left position of the object relative to the layout or coordinate parent, as specified by the offsetParent property.
.offsetParent
Retrieves a reference to the container object that defines the offsetTop and offsetLeft properties of the object
.offsetTop
Retrieves the calculated top position of the object relative to the layout or coordinate parent, as specified by the offsetParent property.
.offsetWidth
Retrieves the width of the object relative to the layout or coordinate parent, as specified by the offsetParent property.
</cite>
Nun ist aber mein Problem das z.B. die Position von Tabellenzellen in Abhängigkeit ihres Containers angegeben wird. Bei vielen anderen Elementen ist das aber nicht der Fall. Jetzt Frage ich mich ob sich damit schon jemand beschäftigt hat und mir sagen kann für welche Elemente was gilt....
Das erfährst du (Englischkenntnisse vorausgesetzt) bis ins kleinste Detail bei:
http://msdn.microsoft.com/workshop/
bzw.
http://msdn.microsoft.com/workshop/c-frame.htm?/workshop/author/default.asp
und mit Bild
http://msdn.microsoft.com/workshop/author/om/measuring.asp
der Rest ist Mathe...
Viel Spaß
CirTap