We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

Ashung on 07/01/08


Tagged

css Firefox cssHack


Versions (?)


Who likes this?

5 people have marked this snippet as a favorite

SpinZ
jonhenshaw
chianess
inamorix
asturi


Firefox 3 CSS hack


Published in: CSS 


Firefox 3 CSS hack

  1. .foo, x:-moz-any-link { } /* FireFox 2 */
  2. .foo, x:-moz-any-link, x:default { } /* FireFox 3 */
  3. html>/**/body .foo, x:-moz-any-link, x:default { } /* Only FireFox 3 */

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: mozewho on July 27, 2008

I feel like blind man in strange area ... coz I am nonexpert in programing language stuff.. by the way just want to know I'll try to learn more.. he8.. thanks very much :- )

Posted By: martyfmelb on January 28, 2009

1 & 2 doesn't work in IE7, because IE7 doesn't drop the rule as it should (but IE6 does, incredibly).

So effectively, hacks 1 & 2 are now "Firefox-N-and-IE7-only" hacks. Might apply to IE8 too if MS doesn't fix / know about the bug above.

I tested 3, without the x:default selector, and it works as expected in at least IE6, IE7, FF3, and is most likely to work in FF2.

Posted By: martyfmelb on January 29, 2009

Addendum to my last comment: 1 & 2 doesn't work in IE7 only if you are using multiple_ie's IE6 (possibly others).

You need to login to post a comment.