Home › Forums › CSS › Please help with center aligning my ul › Reply To: Please help with center aligning my ul
December 30, 2017 at 12:31 pm
#264689
Shikkediel
Participant
No problem, it was a bit tricky because of the combination of a full width ul
and li
elements that are floated. The latter makes it hard to center the child elements – so I went for the parent. That needed the width: 100%
removed so its size would adapt to that of the li
children using display: inline-block
. Then the last step was to center it through the parent, text-align
being the designated option for centering inline elements.
Hope that explains it a bit more. Cheers.