At 11:07 AM 6/15/2005, stu wrote (in part):
I have a div that contains a UL. The UL is a menu, with the LI floated left to ensure that the list displays horizontally instead of vertically (I am sure you know what i mean). I need to get this UL to align to the center of the div - that is, its a liquid design and the ul should be screen centered at all times.

I know there are a million tutorials on the web about centering in CSS, but none of the suggested things seem to work. Can anyone take a look for me?

First, what did you try that didn't work? And in which browsers did you test the code?

In order for the UL to be centered, it needs a width defined (whether exact or percent) and the left and right margins need to set to "auto".

Example:

#footer ul {list-style: none; padding: 0; margin: 8px auto 0 auto; width:550px;}

Your code should also have a valid DOCTYPE.

Ken Robinson
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to