updating vertical spacing of elements