use boundingClientRect instead of offset