Can't get this UL to center in parent div!

I’m trying to get the UL element to be centered in the .menu.nav parent. Can’t seem to get it no matter what I try. Any ideas?

.menu.nav {position:absolute; top:5px; white-space:nowrap;height:20px;width:977px;text-align:center;margin:0 auto;}

.menu.nav ul {overflow:visible; position: relative; list-style: none; z-index:50; padding:0;text-align:center;margin:0 auto;height:30px;background:#ccc}

.menu.nav???

whats your markup like, or did you actually mean “.menu .nav”? Anyway, you need to give the UL an explicit width to center it using the margin: 0 auto; technique.

Call width, and margin: 0 auto;

Thanks guys, I figured it out. I had to add a display:inline-block to the UL element.

I can’t place an explicit width on the UL element because its a flyout menu and all the child UL elements would have to be reset.