views:

11

answers:

1

hey guys, I have a standard nav bar with an unordered list and using sprites. Im also using jquery to render some animation. Everything works fine. I have a problem with centering the bar. It is aligned to the left. I've tried using text-align:center but this doesnt work. I think there are conflicting properties. Could u guys please help me center it? Im not that big a UI developer!

.navbar {
 list-style-type: none;
 list-style-position:outside;
 position: relative;
 margin: 0;
 padding: 0; }

.navbar li{
display: block;
overflow: hidden;
padding: 0;
cursor: pointer;
float: left;
width: 125px;
height: 40px;
margin-right: 0px;
background-image:url(sprite.jpg);
background-repeat:no-repeat;

}
.navbar a{
display:block;
height:40px;
text-indent:-9999px;
outline:none;

}
+1  A: 

Have you tried this?

margin-left: auto;
margin-right: auto;

Or something like this?

margin-left: 0px;
margin-right: 0px;
Weboide
WOW! Thanks so much!
Ram Bhat