I want to get the left and top (relative to window) coordinates for an image I have on a page. The image is not absolutely positioned. Let’s say it is centered in a DIV. Is there any way to get the left and top values using JS?
TIA!
–FCOD
I want to get the left and top (relative to window) coordinates for an image I have on a page. The image is not absolutely positioned. Let’s say it is centered in a DIV. Is there any way to get the left and top values using JS?
TIA!
–FCOD
In general I believe you have to recursively traverse the offsetParent references; see here.