<div class="menu-navigation">
<div id="navcontainer">
<ul id="navlist">
<li id="active"><a href="#" id="current">Item one</a></li>
<li><a href="#">Item two</a></li>
<li><a href="#">Item three</a></li>
<li><a href="#">Item four</a></li>
<li><a href="#">Item five</a></li>
</ul>
</div>
</div>
.menu-navigation{
background:url(images/bg-menu.png) repeat-x;
margin:5px 0;
}
ul#navlist{
white-space: nowrap;
margin:5px 0;
line-height:3em;
}
#navlist li{
display: inline;
list-style-type: none;
margin:0;
}
#navlist a { padding: 3px 10px;}
#navlist a:link, #navlist a:visited{
color: #fff;
font-weight:bold;
font-size:12px;
text-decoration: none;
}
#navlist a:hover{
color: #000;
border:#330099 1px solid;
text-decoration: none;
}
Now, the links are showing to be left aligned. but i want it to be center aligned. when i use margin  , it doesnt work without specifying width.
and when i specify fixed width, then when links will be added it will come in next line. But i want the links in one line n that too center aligned.
Hope these codes will be helpful.
[IMG]file:///C:/DOCUME%7E1/Romisha/LOCALS%7E1/Temp/moz-screenshot.jpg[/IMG]
|