Hey Guys,
I am trying to position my navbar (5 images) to center with the browser. Instead it is positioned to the left and when you make the browser smaller the buttons move.
Here is the CSS:
<style type="text/css">
#navcontainer
{
margin: 200px auto 0px auto;
position: absolute;
}
#navcontainer ul
{
margin: 0px;
padding: 0px;
list-style-type: none;
text-align: left;
}
#button1
{
text-decoration: none;
background: url(button1.jpg) no-repeat top left;
float: left;
margin: 0px;
padding-top: 13px;
width: 198px;
height: 86px;
}
#button1:hover
{
background: url(overbutton1.jpg) no-repeat left top;
}
#button2
{
text-decoration: none;
background: url(button2.jpg) no-repeat top left;
float: left;
margin: 0px;
padding-top: 13px;
width: 144px;
height: 86px;
}
#button2:hover
{
background: url(overbutton2.jpg) no-repeat left top;
}
#button3
{
text-decoration: none;
background: url(button3.jpg) no-repeat top left;
float: left;
margin: 0px;
padding-top: 13px;
width: 110px;
height: 86px;
}
#button3:hover
{
background: url(overbutton3.jpg) no-repeat left top;
}
#button4
{
text-decoration: none;
background: url(button4.jpg) no-repeat top left;
float: left;
margin: 0px;
padding-top: 13px;
width: 146px;
height: 86px;
}
#button4:hover
{
background: url(overbutton4.jpg) no-repeat left top;
}
#button5
{
text-decoration: none;
background: url(button5.jpg) no-repeat top left;
float: left;
margin: 0px;
padding-top: 13px;
width: 224px;
height: 86px;
}
#button5:hover
{
background: url(overbutton5.jpg) no-repeat left top;
}
</style>
And here is the HTML code:
<center>
<div id="navcontainer">
<ul id="navlist">
<li id="button1"><a href="#" id="current"></a></li>
<li id="button2"><a href="#"></a></li>
<li id="button3"><a href="#"></a></li>
<li id="button4"><a href="#"></a></li>
<li id="button5"><a href="#"></a></li>
</ul>
</div>
</center>
I've tried several different things...it's late and I know I'm not thinking straight so if someone figures out what I did wrong before me please comment : )