All css2 centrered

hrioo

You're welcome. Using tables is a lot easier sometimes but probably not as much fun!

styrbaek

YES!!!! That was just what I was looking for, nice and simple.
I used the examble with tables istead of inline and it works perfektly.

Thanks


styrbaek

Thanks a lot.
But is it possible to do this without setting at specifig width of #nav. Else I have to change my css everytime I ad a new menuitem  :-(

hrioo

You have to specify a width for your <div> and apply left & right auto margins.

In your screen.css change the #navContainer to:

#navContainer {
width:748px;
clear:both;
background-color:#666;
border-right:1px solid #000;
border-left:1px solid #000;
border-bottom: 1px solid #000;
}

and change your #nav & #nav ul like so:

#nav {
width:480px;
margin: 0 auto;
height: 1.68em;
background: #666;
}
#nav ul {
list-style-type: none;
font-size: 81%;
text-transform: uppercase;
}

You will probably have to adjust width:480px; to approximate width of your menu.

styrbaek

Does anyone know if it is possible to center the all css2 menu.
I have tried everything (it think), but I can only get the menu to begin at the center.