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.

    • CommentAuthordimmon
    • CommentTimeJun 20th 2006 edited
     permalink
    Is it possible to fix following code in IE without a hack?

    <div class="context_menu">
    <ul>
    <li><a href="?phpMyAdmin=4594f30712f4fabaff6997416810f3f2">test1</a></li>
    <li>test2</li>
    <li>test3</li>
    </ul>
    </div>

    <style>
    .context_menu
    {
    width: 140px;
    }
    .context_menu ul
    {
    padding: 0;
    margin: 0;
    list-style:none;
    }
    .context_menu li
    {
    padding: 0;
    margin: 0 0 -4px 0; Why should I add here this -4px margin in IE? In firefox all works fine without this -4px :(
    list-style: none;
    background:#fdd;
    height: 20px;
    }
    .context_menu li a
    {
    display: block;
    padding:0;
    margin: 0;
    }
    </style>
    Thanks..
    •  
      CommentAuthorJan Meeus
    • CommentTimeJun 20th 2006
     permalink
    I think you're experiencing IE's 3px bug, which is explained at http://www.positioniseverything.net/explorer/threepxtest.html .

    But to get rid of your gap problem without some hack, simply add height: 20px; to your .context_menu li a (Assuming that you are testing with IE 6)
    • CommentAuthordimmon
    • CommentTimeJun 20th 2006
     permalink
    Thanks..forgot about A :) The solution is easier that I thought :)
    And thanks for link to IE's 3px bug, I didn't know about that.
    • CommentAuthordimmon
    • CommentTimeJun 20th 2006 edited
     permalink
    One more stupid question :)
    How to create 1px line in IE (without using border property, cause actually I need to create a line and white border under it)? :)

    Thats showing 2px line:

    .line
    {
    width: 500px;
    height:1px;
    background: #000;
    line-height: 0px;
    font-size:0px;
    padding:0;
    margin:0;
    }
    <div class="line"></div>
    •  
      CommentAuthornifkin
    • CommentTimeJun 20th 2006
     permalink
    try adding overflow:hidden; to that?
    • CommentAuthordimmon
    • CommentTimeJun 20th 2006
     permalink
    Thank you very much. It helped.
Add your comments
    Username Password
  • Format comments as (Help)