Handle vertical and horizontal alignment for prev and next button
depending on items displayed