Getting correct coordinates for div