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: 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??
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.
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
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.
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
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!
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] 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
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