Use getBoundingClientRect to get element position