View Full Version : Centre a navigation bar?

03-24-2009, 09:20 PM
In the title really, i want the tabs centered not the actually navigation bar.

#navcont {
margin-left: 11px;

#nav {
background: url('images/nav/nav_bg.png') repeat-x;
width: 822px;
height: 42px;
margin-top: 24px;
list-style: none;
float: left;

#nav li {
float: left;

#nav a:link, #nav a:visited {
float: left;
line-height: 42px;
height: 42px;
display: block;
padding: 0 22px 0 22px;
color: #fff;
text-decoration: none;
background: url('images/nav/nav_bg.gif') repeat-x;

#nav a:hover, #nav a:active {
text-decoration: underline;
background: #000 url('images/nav/nav_hover.png') repeat-x;

any ideas where it needs to go?

03-25-2009, 01:08 AM
you could put a div inside the nav container and centre that with your links inside that div

03-26-2009, 01:57 PM
The tabs should be realtive to what? Can you draw a picture?