OK, heres the deal...I know how to document.getEle mentById('id'). style.position and .top and .left. My question refers to the elements position on the page how the client sees it. for example: I need to find the .top of an element that has been placed inline and has no set .top. Is there like an absolute x or y position I can look at?
How do I get/read/manipulate an elements position?
Collapse
X
-
Tags: None
-
-
The offsetLeft and offsetTop properties return the left and top positions of an object relative to the left and top sides of its offsetParent element. If you need the position of an element relative to the upper-left corner of the browser's client area, use the getBoundingClie ntRect method instead.
You can find detailed description and examples on the following pages:
getBoundingClie ntRect,
offsetLeftComment
Comment