Hi guys, I've gone through many websites trying to find a solution. Since I'm not that good with css (just started learning) i've failed to get it to work. I have a simple css menu that i've been trying to center for hours now:( could somebody help me out and give me an opportunity to learn from you I'd really appreciate it. Thank you in advance.
css
#container {
width:800px;
margin:0 auto;
padding:0;
background-color: #CCC;
}
#footer
{
clear:both;
}
/* ### MENU ### */
#adminmenu
{
width:100%;
}
ul {
position:relative;
font-family: Arial, Verdana;
font-size: 14px;
margin: 0;
padding: 0;
list-style: none;
text-align: center;
}
ul li {
display: block;
position: relative;
float: left;
}
li ul {
display: none;
}
ul li a {
display: block;
text-decoration: none;
color: #ffffff;
border-top: 1px solid #ffffff;
padding: 5px 15px 5px 15px;
background: #2C5463;
margin-left: 1px;
white-space: nowrap;
}
ul li a:hover {
background: #617F8A;
}
li:hover ul {
display: block;
position: absolute;
}
li:hover li {
float: none;
font-size: 11px;
}
li:hover a {
background: #617F8A;
}
li:hover li a:hover {
background: #95A9B1;
}
/* ### END MENU ### */
HTML
<body>
<div id="container">
Admin Panel
<div id="adminmenu">
<ul>
<li><a href="index.php">Main Menu</a></li>
<li><a href="menu2.php">Menu2</a></li>
<li><a href="menu3.php">Menu3</a>
<ul>
<li><a href="menu4.php">menu4</a></li>
<li><a href="menu5.php">menu5</a></li>
</ul>
</li>
</ul>
</div>
<div id="footer">Footer</div>
</div>
</body>