Results 1 to 2 of 2

Thread: centering a nested li

  1. #1
    Join Date
    Apr 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default centering a nested li

    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

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Code:
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •