Firefox ignores my padding???

Discussion in 'CSS' started by D3froztt, May 3, 2006.

  1. #1
    Hi guys i have a big problem with a menu

    it works perfect in IE but in firefox its only the first line of text that accepts the padding???
    like this:
    [​IMG]

    but why_???

    the css i use on the cells is as follow:

    .subMenu1 {
    font-family : Verdana, Arial, Helvetica, sans-serif;
    color : #ffffff;
    font-size : 11px;
    text-decoration : none;
    height : 23px;
    padding : 5px 5px 5px 13px;
    }

    a.subMenu1:hover {
    font-family : Verdana, Arial, Helvetica, sans-serif;
    color : #ffff00;
    font-size : 11px;
    text-decoration : underline;
    height : 23px;
    padding- : 5px 5px 5px 13px;
    background-image : url(/error/images/ydot.gif);
    background-repeat : no-repeat;
    }

    can anyone explain to silly me why this dosnt work in firefox??
     
    D3froztt, May 3, 2006 IP
  2. Huvet

    Huvet Member

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #2
    This is impossible to answer unless you show a live page. My guess is that you are in quirks mode by using an old doctype. Feel free to read more in my article about Cross Browser CSS.
     
    Huvet, May 3, 2006 IP
  3. D3froztt

    D3froztt Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    well i guess? eh? i tried to play atound with the doctypes and it only fucks everyhing BUT that up... the menu stays the way it is :-s

    ive copied the importent stuff (read: menu) onto this page... if its any help

    http://home.no/d3froztt/error/fuckup.htm

    thanks in advance
     
    D3froztt, May 3, 2006 IP
  4. JudyJiaStyle

    JudyJiaStyle Well-Known Member

    Messages:
    139
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #4
    padding- : 5px 
    Code (markup):
    You should take out the '-'.

    I don't think the A HREF is considered a 'block' so if you put padding or margins on it, it's not going to show up (on FF anyway). If you put the class on the TD or a DIV, it will work better.
     
    JudyJiaStyle, May 3, 2006 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    Scattershooting in the dark, since there's no html to check.

    Assuming that's a list, keep in mind that IE and Opera indent the list with left margin. Moz/Gecko and Safari/KHTML use left padding. About 40px in all cases. It looks like both browsers are pretty much doing what you told them. You just didn't quite tell them the right thing to do. Were you to declare {margin-left: 40px;}, both would start from the same place.

    Lot's of coders simply start out with ul {margin: 0; padding: 0;} then style the lists from scratch.

    If that's not it, bring some code to the table.

    cheers,

    gary
     
    kk5st, May 3, 2006 IP
  6. D3froztt

    D3froztt Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    yeah it is because you cant use the a href as a blok in ff, and it seems to work when i remove it and put it on the td tag... i just have to redo my entire menu again... :s but thanks!
     
    D3froztt, May 5, 2006 IP
  7. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #7
    You can use a {display: block;} in IE. But, because of its bugginess, you have to be sure to trigger hasLayout. See my IE whitespace bug fix article for a fix of a particular hasLayout artefact. For the real lowdown, see Ingo Chao for his article, On Having Layout ….

    [edit] :oops: I misread ff as IE, out of habit, I guess. Do keep in mind that if there is a difference between Firefox and IE, it is highly likely that IE has got it wrong, and that Firefox is rendering as you told it. You can, in fact, and without mis-rendering, make a {display: block;} in Firefox. IE, as mentioned above, is really buggy about it. Give further thought to where the problem really lies. [/edit]

    cheers,

    gary
     
    kk5st, May 5, 2006 IP
  8. Greg-J

    Greg-J I humbly return to you.

    Messages:
    1,844
    Likes Received:
    153
    Best Answers:
    0
    Trophy Points:
    135
    #8
    Small world Gary. Perhaps you and I can get off to a fresh start now that I know you play on my stomping grounds as well ;)
     
    Greg-J, May 6, 2006 IP
  9. D3froztt

    D3froztt Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    fucking hell!... it worked... thanks mate

    display : block - my friend :D
     
    D3froztt, May 8, 2006 IP