Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormrpainter
    • CommentTimeApr 25th 2006 edited
     permalink
    I'm having a problem with my lists. They're contained within a floated leftnav and in every browser but ie 6 and 7 for the pc they're fine. In those two browsers it appears that the margin-left is doubled. The leftnav is floated to the left. Is this the IE Doubled Float-Margin Bug?

    Here's the markup:

    <div id="leftnav">
    <h2><img src="design_rock.gif" alt="designers that rock" height="30" width="200" /></h2>
    <ul class="navlist">
    <li><a href="#">test</a></li>
    <li><a href="http://www.andyrutledge.com/">Andy Rutledge</a></li>
    <li><a href="http://www.hicksdesign.co.uk/">John Hicks</a></li>
    <li><a href="http://www.jasonsantamaria.com/">Jason Santa Maria</a></li>
    <li><a href="http://www.simplebits.com/">Dan Cederholm</a></li></ul>
    <h2><img src="css_gall.gif" alt="css galleries" height="30" width="200" /></h2>
    <ul class="navlist">
    <li><a href="http://www.stylegala.com/">Stylegala</a></li>
    <li><a href="http://www.cssbeauty.com/">CSS Beauty</a></li>
    <li><a href="http://cssmania.com/">CSS Mania</a></li>
    <li><a href="http://cssimport.com/">CSS Import</a></li></ul>
    </div>

    And the CSS:

    #leftnav { width: 250px; background: transparent url("leftnav_back.gif") no-repeat center center; float: left; display: inline;}

    #leftnav h2 {width: 200px; height: 30px; margin: 20px 20px 10px 20px;}


    .navlist
    { width: 150px; }

    .navlist li
    { font-size: 90%; font-family: "Trebuchet MS", Verdana, Arial, Geneva, sans-serif; font-weight: bold; text-align: left; list-style: none; padding: 3px; }

    .navlist li a { text-decoration: none; width: 150px; display: block; margin-left: 30px;}

    .navlist li a:link { color: #B19939; text-decoration: none }
    .navlist li a:visited { color: #B19939; text-decoration: none }

    .navlist li a:hover
    { color: #DACA8B; text-decoration: none }


    Here's the page:

    http://homepage.mac.com/justinmcgonigle/float/float.html

    I've yet to see if the display:inline added to the floated leftnav works. I'm using browsershots.org and I'm still waiting for the screen shots.

    Thanks for your help

    Justin
    •  
      CommentAuthorbenjitastic
    • CommentTimeApr 25th 2006 edited
     permalink
    If I'm understanding the problem correctly by looking at the link then this should fix it:

    add "text-align: left;" to the #leftnav
    • CommentAuthormrpainter
    • CommentTimeApr 26th 2006
     permalink
    Thanks benjitastic. I ended up finding another solution. I hadn't even thought of that because I had declared text-align:left to the li's. You're probably right though, it most likely would have done the trick since only the li's were given that rule and not the entire #leftnav......:-)
Add your comments
    Username Password
  • Format comments as (Help)