I'd suggest making the child ul
element inline-block
.
#nav-inner > ul {
display: inline-block;
}
And then adding text-align:center
to the parent element, #nav-inner
.
#nav-inner {
text-align: center;
background: url(theme/nav-inner.png?486154) repeat-x;
padding: 2px 5px 3px;
}
This will ensure that the menu is centered regardless of its dimensions - good for dynamic content (i.e., you don't have to set a fixed width and use margin:0 auto
..).