get top and left value