<font face="arial" size="2">Thanks Paul and Richard...<br /><br />&nbsp;&nbsp;&nbsp;I guess I was looking for some magical method that would allow me to do this without iterating through *every* element on the page.&nbsp; Perhaps that's not a possibility right now, and I just need to get down and dirty with the DOM.&nbsp; As usual, I'm sure PPK's stuff will prove helpful.<br /><br />Cheers,<br /><br />Peter<br /><br /></font><font face="Tahoma, Arial, Sans-Serif" size="2"><b>From</b>: Paul Novitski <a href="mailto:paul@novitskisoftware.com">paul@novitskisoftware.com</a><br /></font><br />At 08:27 PM 2/3/2005, Peter Brunone wrote:<br />&gt; Is it possible, with an absolutely-positioned element, to<br />&gt;determine what controls (either absolutely or relatively positioned)<br />&gt;overlap its current area?<br /><br />Peter,<br /><br />As far as I know you can determine the dimensions and position in the <br />window of any element on the page, regardless of how it was <br />positioned. Peter-Paul Koch's got some nifty little functions for <br />determining position on http://www.quirksmode.org/ (navigate to Javascript <br />: DHTML : Find position) Then it's a simple matter of iterating through <br />all the elements on the page, doing the necessary arithmetic to discover if <br />any overlap your target element.<br /><br />Upon reflection, it seems to me that two boxes overlap if any one corner of <br />either box lies between the top and bottom AND between the left and right <br />edges of the other box. That logic would require eight tests per pair of <br />boxes to prove that they didn't overlap, testing each corner of both boxes <br />to see if it lay within the other box. Perhaps you can reduce that to <br />something more elegant!<br /><br />Well, let's see: in four tests you can find out whether:<br />- the top of box A lies below the bottom of box B, or<br />- the bottom of box A lies above the top of box B, or<br />- the left edge of A lies to the right of B's right edge, or<br />- the right edge of A lies to the left of B's left edge.<br />If any of those are true, the boxes can't overlap. If all are false, I <br />believe they must overlap. N'est ce pas?<br /><br />Paul