How do I center align the items WITHIN in my menu? (The li
s) I managed to center the menu (ul
) within the page of my website but I can't center the actual items in the menu (Home, About, etc.)
You can edit my HTML/CSS here: http://jsfiddle.net/66reH/
To see the results
CSS/HTML:
#nav
divtext-align: center;
to the #nav
selector CSSmargin-left
property for the ul
selector CSStext-align: center;
to the ul
selector CSSfloat: left;
property on the li
selector CSSdisplay: inline-block;
to the li
selector CSSYou didn't have a centered menu there. You simply added 170px to the left of the UL in the CSS so it sort of looked centered. But it wasn't.