gets an element's offset