Condition comment equivilent for firefox

Hi All,

Just wondering id anyone knows of a conditional comment equivalent for firefox? similar to <!–[if ie 7]> for IE.
I have looked on this forum but only found 1 post from mid 2008…

My problem is the css is working fine in FF 3.0.13 on the Mac but results in different padding on my nav menu in FF 3.0.11 on a PC

Any help much appreciated!

Conditional comments are only recognized by IE
If there is a difference between rendering in different Firefox/OS it will need to be addressed with CSS, maybe a global reset type of thing?

Thanks for your reply Mittineague,
Could you explain what you mean by ‘global reset’?

eg: if i want the css to be this in ff 10.0.13:

#nav_sub a:link, #nav_sub a:visited {
padding: 10px 26px 9px 27px;

but this is ff 10.0.11:

#nav_sub a:link, #nav_sub a:visited {
padding: 11px 24px 10px 25px;

What do you suggest?


Set the padding yourself for whatever elements are picking up different default values.

Because different browsers set different default values to certain elements (eg. body padding), some CSS authors recommend setting everything (global) back to “0” (reset) and starting from scratch. Way overkill IMHO. But if you can figure out where the offender is, it might be a good idea to do that one. Not so easy to figure out I’m afraid. What with “cascading” of inherited properties and all. But I have no doubt that someone in the CSS forum would be able to help much better than I could.

It seems strange to be fiddling with such small differences. It might be better to rethink your layout if such minor variations make a significant difference. Most people upgrade to the latest version of firefox anyway. If only it were the same for IE.

You’d hope so, but the stats for my site for the last month (which deals with web development topics so you’d think the audience would be more likely to upgrade), show 8.2% still using FF 3.0.x which is still quite a high number.

But I agree with your main point that if you’re having to worry about such small details that maybe another approach is needed.

I agree, you should accept that small differences may occur between platforms and rendering engines, the main thing is that it doesn’t severely impact your design. If the padding is just causing a minor offset in your design rather than collapsing anything, I would just leave it as a minor quirk and leave it as it is. Trying to make everything work the same across every browser is impossible, you should perhaps concentrate on more important aspects of your design. :slight_smile:

After seeing “minor” a few times I took a closer look at the example.
I have to agree. Don’t worry so much about getting things identical cross-browser. Indentical will never happen anyway, there will always be something out there you haven’t tested for.

How many site vsitors will be viewing the site in more than one browser simultaneously? How many are going to go back using a different browser than the previous visit and realize there’s a pixel or two difference? I mean even subliminally?