Log in

View Full Version : centering a nested li



arbel
09-19-2007, 09:15 PM
Hello,

please take a look here:
http://arbel-designs.com/css_help/i2.html

if you click on the links a drop menu opens..
here's my problem:

I need to get the main links - top level to be centered in a 191 width.
next, I need the second level, to start exactly where the centered text starts.

But I can't seem to center the nested li or ul....

Thanks

Idan

boogyman
09-20-2007, 12:02 AM
selector {
margin: 0 auto;
width: 100%;
}

is the code to center some content. although creating an absolute width of 191pixels to center the content in is very much so going to be inaccessible to multiple people do to pixels being rendered differently among all of the browser's interpreters. you also need to consider that with one text-size increase, the list will be effectively broken as the text will break out of the mold and container that it is set in to fit its width.