Opera Padding Issue

Discussion in 'CSS' started by Mooseman, Jun 19, 2007.

  1. #1
    I'm working on a site and I got some padding issues that appear in Opera. (works fine in IE6, IE7 and FF btw)

    What happens is that whatever padding I use, Opera seems to do some pixels less or what to say.
    For the padding I use here, Opera always place the menu (links) 1 or 2 pixels higher then the other browsers. I haven't experiences this before..

    
    #menu ul{
    list-style:none;
    width:100%;
    margin:0;
    padding:8px;
    }
    
    * html #menu ul{
    width:97%;
    }
    
    #menu li{
    display:inline;
    }
    
    #menu li a{
    font:bold 11px Tahoma;
    padding:8px;
    color:#ffffff;
    text-decoration:none;
    margin:0;
    }
    
    #menu li a:hover{
    background:#727272;
    }
    
    Code (markup):
    There's the code.

    Anyone knows what may cause this?
    (The page is validated)
     
    Mooseman, Jun 19, 2007 IP
  2. briansol

    briansol Well-Known Member

    Messages:
    221
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    110
    #2
    opera handles line-height weird on lists.

    try setting a hard definition like

    li { line-height: 2em; }
     
    briansol, Jun 20, 2007 IP
  3. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I almost never experience this kind of problem in Opera. Then again I always strip every element of their margins and padding via the universal selector, declare the font size to be 100% in the body, and then set the line height to 150% (like so: * { margin: 0; padding: 0; } body { font: 100%/150 Verdana, Arial, Helvetica, sans-serif; } ) before setting my container widths in EMs.

    Just some brain food for thought.
     
    Dan Schulz, Jun 20, 2007 IP
  4. Mooseman

    Mooseman Peon

    Messages:
    453
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks guys, gonna try that and see if I can get it to work :)
     
    Mooseman, Jun 20, 2007 IP