SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jan 2003
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    urgent! 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
    Idan Arbel
    Arbel Designs
    Email/msn idan@arbel-designs.com
    http://www.arbel-designs.com

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    Sydney, Australia
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    menu-styles.css (line 42)
    text-align: left

    should be
    text-align: center;

  3. #3
    SitePoint Guru babyboy808's Avatar
    Join Date
    Nov 2004
    Location
    dublin
    Posts
    602
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    replace your #menu li ul with below:

    #menu li ul
    display:block;
    float:none;
    left:-999em;
    margin-right:auto;
    padding-left:77px;
    padding-top:10px;
    position:absolute;
    width:90px;
    }

  4. #4
    SitePoint Member
    Join Date
    Jan 2003
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, but the problem with using padding left is that if I have one top link that short - "link" and another that's long - "very long link" they require different paddings in order to line up....
    Idan Arbel
    Arbel Designs
    Email/msn idan@arbel-designs.com
    http://www.arbel-designs.com


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
  •