For instance, lets build a horizontal list. Just give the list centered text (e.g. This will finally result in a horizontal list. To make text horizontally center, you have to use text-align:center. This comment thread is closed. Implementing horizontal lists is, thanks to the flexibility of CSS, not a tough task. Also, Happy Christmas folks (for those that celebrate it). Now the text-align property isnt going to help, because youll have to float them to the left. You might not need them all today, but its nice to have the control for a redesign idea you might have tomorrow. There we go, we have our horizontal list. Centering both horizontally and vertically was difficult before flexbox, with the Box Alignment properties it is now straightforward. The reason they refuse to center is because they are also floated to the left. To learn more, check out the documentation on Responsive Design, Dark Mode and other media query modifiers. How can I vertically center a div element for all browsers using CSS? For example, in FF when you expand to the point a link box wraps down to the next line, it works fine, but when you decrease the size back down, it doesnt un-wrap back up. Horizontal alignment of list items Ask Question Asked 9 years, 5 months ago Modified 5 years, 3 months ago Viewed 69k times 16 I want to align the list items horizontally. How do I center an ordered list? The