Could someone help me with centering my CSS UL menu? I've posted the code below, as I'm still learning CSS and would appreciate any guidance.
I've only been able to center it by setting a fixed width and using HTML center tags, but I need the menu to expand to 100% and automatically center.
The CSS
#menu{
width:100%;
margin: 0;
padding: 5px 0 0 0;
list-style: none;
background-color:#333333;
text-align:center;
}
#menu li{
float: left;
padding: 0 0 5px 0;
position: relative;
list-style:none;
margin:auto;
}
#menu ul{
list-style:none;
display:inline;
margin: 0;
padding: 0;
text-align: center;
}
#menu a{
float: left;
height: 15px;
padding: 0 25px;
color:#FFF;
text-transform: uppercase;
font: 10px/25px Arial, Helvetica;
text-decoration: none;
text-shadow: 0 0px 0 #000;
}
#menu li:hover > a{
color:#F90;
font: bold 10px/25px Arial, Helvetica;
}
*html #menu li a:hover{ /* IE6 */
color: #F06;
}
#menu li:hover > ul{
display: block;
}
Your assistance is much appreciated!