Forums

Sidebar list padding issue in IE7 (4 posts)

  1. soundproofskin
    Member
    Posted 4 years ago #

    I'm having an issue with my sidebar navigation - I'm basically editing the default theme to style it up the way I need it to look and work and I have come a long way only for what feels like a really simple problem to stop me in my tracks. If you take a look at this page in FF and IE7 you will see what I mean: http://bmrt.org.uk/wordpress/

    Ignoring the garish colours which I am using to try to help understand the padding, Firefox is displaying this as I wish, but IE7 is adding a large margin or padding above each link.

    Here's the sidebar CSS which I have stripped right down to fundamentals:

    #sidebar {
    background:url(images/sidenav_top.jpg) no-repeat;
    padding: 155px 0 10px 17px;
    width:163px;
    float:left;
    margin-left:0px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    text-decoration:none;
    color:#3b3b3b;
    }

    #sidebar a:link, #sidebar a:visited {
    text-decoration:none;
    color:#3b3b3b;
    }

    #sidebar a:hover {
    color:#b4201c;
    }

    #sidebar ul {
    margin:0;
    padding:0;
    }

    #sidebar ul li {
    list-style-type: none;
    list-style-image: none;
    background-color:#CC9900;
    }

    #sidebar ul ul li {
    margin:3px 0 0 0;
    padding:2px 0 7px 0px;
    border-bottom:1px solid #e4e7c3;
    background-color:#00FF33
    }

    I would appreciate any ideas!

  2. insomn3ak
    Member
    Posted 4 years ago #

    Did you ever find a solution to this? I'm having the exact same problem right now too.

  3. insomn3ak
    Member
    Posted 4 years ago #

    Just FYI - I figured out a solution that worked for me. Try adding the following code to #sidebar ul in the CSS you have showing above...

    font: 0.1em/0.5 sans-serif;

    This sets the line height for IE7 and IE6, effectively removing the padding above each list-item. Having the san-serif property is necessary for this to work.

  4. xenon2050
    Member
    Posted 3 years ago #

    I LOVE YOU insomn3ak!!!
    I've been having this problem for a while and couldn't figure it out but this worked great!
    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic