Centering block menu `<li>` elements in a `<div>`

This should be an easy one - I'm just missing something simple, I'm sure.

I have a header and want a nested, centered horizontal menu.

#header {
    background:url(images/headers/header.gif);
    margin: 0 auto;
    height: 207px;
    width: 100%;
}

/* =Menu
-------------------------------------------------------------- */

#access {
    background: transparent;
    display: block;
    text-align: center;
    float: left;
    margin: 150px auto 0;
    width: 940px;
}
#access .menu-header,
div.menu {
    font-size: 13px;
    margin-left: 120px;
    width: 766px;
}
#access .menu-header ul,
div.menu ul {
    list-style: none;
    margin: 0 auto;
}
#access .menu-header li,
div.menu li {
    background-color: #444;
    margin: 0 auto;
    float: left;
    text-align: center;
    width: 110px;
    position: relative;
}
#access a {
    color: #aaa;
    display: block;
    line-height: 38px;
    padding: 0 10px;
    text-decoration: none;
}
#access ul ul {
    box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
    -moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
    -webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
    display: none;
    position: absolute;
    top: 38px;
    left: 0;
    float: left;
    width: 180px;
    z-index: 99999;
}
#access ul ul li {
    min-width: 180px;
}
#access ul ul ul {
    left: 100%;
    top: 0;
}
#access ul ul a {
    background: #333;
    line-height: 1em;
    padding: 10px;
    width: 160px;
    height: auto;
}
#access li:hover > a,
#access ul ul :hover > a {
    background: #444;
    color: #fff;
}
#access ul li:hover > ul {
    display: block;
}
#access ul li.current_page_item > a,
#access ul li.current-menu-ancestor > a,
#access ul li.current-menu-item > a,
#access ul li.current-menu-parent > a {
    color: #fff;
}
* html #access ul li.current_page_item a,
* html #access ul li.current-menu-ancestor a,
* html #access ul li.current-menu-item a,
* html #access ul li.current-menu-parent a,
* html #access ul li a:hover {
    color: #fff;
}

site: http://74.86.183.200/~riaharb/stage/

Thanks in advance!

Answers


That's not hugely tricky, this should work:

#parent_ul {
width: 80%;
text-align: center;
margin: 0 auto;
}

#parent_ul > li {
display: inline; /* or inline-block */
}

Need Your Help

Conditional jump or move depends on unitialised values(s) even though my variable is initialised?

c valgrind

According to Valgrind, the variable "holder" is uninitialized in my function spaceMove(). Noticeably, it says that whenever I try to manipulate that variable. I tried initializing it to NULL before

WPF StringFormat TextBlock text

wpf string-formatting

I'm trying to format a string in WPF for a text block. I want to obtain something like this in my text block: [name]. I know to bind text block's text to the string property which I want to show bu...