Zrb0529
Zrb0529

Reputation: 800

Horizontal CSS UL Menu

For some reason my CSS styled UL menu won't center horizontally. The CSS to create it is:

#navigation {
    width:79em;
    height: 2em;
    position: relative;
    padding: .5em;
    font-family: Verdana, Geneva, sans-serif;
    text-transform: uppercase;
    font-size: 1em;
    background-color: #F5F5F5;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    -webkit-box-shadow: 0 0 1em 0 #333;
    -moz-box-shadow: 0 0 1em 0 #333;
    box-shadow: 0 .25em .3em -.055em #333;
}

#navigation ul {
    text-align: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

#navigation li {
    display: inline;
    list-style: none;
    display: block;
    float: left;
    width: 10em;
    height: 2em;
    text-align: center;
    padding: .5em 0 0 0;
    margin: 0;
    border-left: .0625em solid #FFF;
    border-right: .1em solid #CCC;
    text-shadow: .0625em .0625em .0625em #ffffff;
    filter: dropshadow(color=#ffffff, offx=1, offy=1);
}

Upvotes: 1

Views: 839

Answers (1)

gandil
gandil

Reputation: 5418

add

#navigation {
...
margin : 0 auto;
}

Upvotes: 1

Related Questions