That is because the list items, by default, are elements with a block display and hence are taking full horizontal space. Why are Suriname, Belize, and Guinea-Bissau classified as "Small Island Developing States"? margin: 0 auto; ul#horizontal-list rev2023.3.3.43278. Lets set them to have aninline-block display. nav { text-align: center; } ) and the list items inline-block (e.g. how to align text inside an li to its center li { display: flex; flex-direction: row; align-items: center; } . 1 hour ago. These methods are as follows: So without further ado, lets get started. 02 Jan 2016. WOOT! You would need to use block level elements instead of inline elements to do that. You need to bring the bullet points inside the content flow by using list-style-position:inside; , and then center align the text. @Roberto: Yeah this is starting to get a little confusing Lets say you wanted to declare an absolute width to each of those list items in your contact bar, a reasonable request. please help. Making statements based on opinion; back them up with references or personal experience. </center>. min-width: 50px; See the Pen css horizontal list menu by CSS4HTML (@CSS4HTML) on CodePen. space-between The ordered list element should be horizontally centered on the web page with the list items in vertical alignment. . Wrap the