CSS Hacks Mozilla FireFox

Sep26
  • Share/Bookmark

Difficulty: ★★☆☆☆

Life is a bitch when you are a webdesigner. – With so much (new) browsers (Internet Explorer 6,7, Firefox 2,3, Opera 9, Chrome etc), your webdesign looks completely different in every browser, while browser compatibility is a very important point.
Luckily there are some hacks to exclude some browsers. In this post I exclude Mozilla Firefox:

These hacks don’t validate, but are 100% safe according to CSS parsing rules.

/* ff 2.0 > */
#hackme, x:-moz-any-link {styles for Firefox 2.0 here}
#hackme, x:-moz-any-link, x:default {restore styles for Firefox 3.0 and newer}

/* ff 3.0 > */
#hackme, x:-moz-any-link {styles for Firefox 1.0 here}
#hackme, x:-moz-any-link, x:only-child {restore normal styles for newer versions}


Leave a comment