Next, set the child element's position property to absolute, top to 50%, and left to 50%. list-style: none; Share Improve this answer Follow answered Jul 3, 2012 at 3:52 To prevent this, just make sure the parent element cannot become to small where this happens by either setting a static width that is large enough, or a min-width. Position The List Item Markers. background-position: left top; Step 8 - Add a rollover color. With this code I attached the following CSS (generalized): #navcontainer ul { To add a list of options in the vertical menu use HTML. How To Center A List In Html Related Questions. The list-style-position property specifies the position of the list-item markers (bullet points). display: inline-block & text-align: center. Approximately 800px wide, when the logo is centered and the menu falls to the next line, but before the mobile menu appears. Ways to Center Align items in CSS. float: left; Just give the list centered text (e.g. Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, i have a question, why does display: inline doesn't work? In this recipe you will see how to center one box inside another. But when the li element is not img.