Jump to content

how to calculate the coordinates of a span or div


dsaba

Recommended Posts

i am creating div elements and span elements in my page

 

example div:

<div id="uniqueid">some text</div>

 

I need to be able to know the coordinates of a specific div, by referencing its unique id

Kind of like searching for a div by its id, and then getting the coordinates of that div

 

Is there some kind of formula or algorithim I can use to do this?

 

Any help or thoughts would be much appreciated

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.