Xiaolei Li wrote:

hi, i'm writing an app that needs the coordinates of DOM elements.
given some DOM node (image, text, table, etc.) and the rendered page,
i'd like to find out the coordinate of the upper-left hand corner and
the width/height of the node.  is there API to do this?  thank you.

Coordinates relative to what? Are you in JS, C++ or a web page?

You could call getComputedStyle and look at the top and left properties, which I believe are the offsets in px relative to the containing box.

Gerv
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to