#topmenu { It aligns the Flex Items across the axis. The element will then take up the specified width, and the remaining space will be split equally between the two margins: This div element is centered. Step 6 Padding around list items. See the Pen Horizontal list group with Bootstrap 3 by Lazy Jones (@lazy) on CodePen. To just center the text inside an element, use text-align: center; This text is centered. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Explanation: CSS Combinators clarifies the relationship between two selectors. . background-position: left top; It works perfectly. But i must admit its not a necessary code, the navigation also works without lists. There we go, we have our horizontal list. . The first step is to change its location to absolute to remove it from the usual document flow. Please dont be annoyed if it doesnt turn out the way you expected, instead try something else because CODES DONT LIE. Find centralized, trusted content and collaborate around the technologies you use most. There are two simple ways to center list item horizontally. You can use the <center> tag to center the enclosed text. What am I doing wrong here in the PlotLegends specification? Until then, Ill continue my crusade against navigation lists. That was the original intention of my article, solving that problem. I am having major trouble getting the simplest of codes to work. The closes I can get is using tabe/t-row/t-cell (anyone noticed if you set display:block, then display: table IE6 seems to respond to the table? Cheers for the quick response Chris, ive just made my tempalte viewable live at, http://www.nukedesign.co.uk/dev/sitetest/. The ol element is used when the list is ordered and the ul element is used when the list is unordered. If you look at the navigation code, its just a div with a bunch of anchor tags no lists. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. Example .center { How to Center Align Items in CSS with 4 Solid Methods. background-position: left top; ;). Ive been using the following code as a standard for my nav, and its worked famously: