Use getBoundingClientRect instead