How to center a navigation bar with CSS or HTML?

tokyowp picture tokyowp · May 13, 2011 · Viewed 344.5k times · Source

I am having difficulty with centering the navigation bar on this page.

I tried nav { margin: 0 auto; } and a bunch of other ways, but I still can't center it.

Answer

morgar picture morgar · May 13, 2011
#nav ul {
    display: inline-block;
    list-style-type: none;
}

It should work, I tested it in your site.

enter image description here