get relative position in an element on mouse clicks