The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Please help with center aligning my ul Reply To: Please help with center aligning my ul


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.