fixed the positioning of the elements of different sizes