dsaba Posted May 24, 2007 Share Posted May 24, 2007 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 Link to comment https://forums.phpfreaks.com/topic/52760-how-to-calculate-the-coordinates-of-a-span-or-div/ Share on other sites More sharing options...
nogray Posted May 25, 2007 Share Posted May 25, 2007 if you download the NoGray JS Library, there are 4 functions you can use getTopOffset() getLeftOffset() getHeight() getWidth() http://www.nogray.com/new_site/download.php Link to comment https://forums.phpfreaks.com/topic/52760-how-to-calculate-the-coordinates-of-a-span-or-div/#findComment-261189 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.