Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2005
    Posts
    224
    Thanks
    1
    Thanked 0 Times in 0 Posts

    IE won't pad unordered list

    I have a navigation section in my stylesheet:
    Code:
    #nav {
    height: 110%;
    width: 10em;
    position:absolute;
    border-right: thin dotted #000000;
    }
    Then this to clear the padding on the unordered list.
    Code:
    #nav ul{
    padding: 0 0 0 0;
    }
    and list items
    Code:
    #nav li {
    list-style: none;
    height: 46px;
    margin: 5px;
    padding: 0 0 0 55px;
    background: url("img/nav_button.gif") 0 center no-repeat;
    line-height: 45px;
    font-size:12px;
    }
    Using that setup, in firefox, the list appears justified to the left in #nav, but in IE, its in the center.

    What should I do to work around this problem in IE?
    Last edited by Crazydog; 05-23-2007 at 06:39 AM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Specify top and left values for #navigation.
    Code:
    #nav {
    height: 110%;
    width: 10em;
    position:absolute;
    border-right: thin dotted #000000;
    left:0;
    top:0;
    }
    And to clear the padding on the list you can just do this, you should also remove the default margins. No need to specify each side to 0 if its all just 0.
    Code:
    #nav ul{
    margin:0;
    padding: 0;
    }
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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