If you use jQuery, you can find the left, top, width and height of the div using them:
$(myDiv).offset().left
$(myDiv).offset().top
myDiv.offsetWidth
myDiv.offsetHeight
Use those to work on the left, right, top and bottom of each div. Then two divs overlap with each other if:
left1 < right2 && left2 < right1 && top1 < bottom2 && top2 < bottom1
source
share