Table Of Content
- Using conditional comments it is easy to target Internet Explorer with browser-specific CSS rules:
- Sometimes it is the Gecko engine (Firefox) that misbehaves. What would be best way to target only Firefox with your CSS rules and not a single other browser? That is, not only should Internet Explorer ignore the Firefox-only rules, but also WebKit and Opera should.
- This is probably the most clean and easy solution out there and does not rely on JavaScript being turned on.
- It’s based on yet another Mozilla specific CSS extension.
- Here is how to tackle three different browsers: IE, FF and Chrome
- Here is some browser hacks for targeting only the Firefox browser,
Using selector hacks.
JavaScript Hacks
Media Query Hacks
- This is gonna work on, Firefox 3.6 and Later
- Using -engine specific rules ensures effective browser targeting.
- you can use this:
Firefox 2 :
Firefox 3 :
Any Firefox :
- The only way to do this is via various CSS hacks, which will make your page much more likely to fail on the next browser updates.
- If anything, it will be LESS safe than using a js-browser sniffer.
