View Full Version : Centering a UL Menu

12-23-2009, 12:51 AM
OK...I want to center a UL Menu made in CSS that i found at Listamatic.. the Menu that they have floats to the left, and i just cant figure out has to center it. Here is the site and code... http://css.maxdesign.com.au/listamatic/horizontal26.htm

12-23-2009, 01:44 AM
Centre like any other element,

give the container a width and add a margin left and right to auto.

For example

#navcontainer {
width: 500px;
margin: 0 auto;

This doesn't need to be in a div though, just use the UL.

12-23-2009, 01:50 AM
by the way they haven't floated the whole nav to the left its just appears on the left as this is the browser default unless you tell it otherwise.

What they have floated left is the li's i.e. the buttons themselves.

12-23-2009, 04:48 PM
Thanx Ricky... worked awsome... and nice to see you again friend.. Merry Xmas..!!!!

12-23-2009, 05:34 PM
Thanks Chapo, its nice to be back, just been a bit busy myself.