CSS Browser Selector
Simple trick to help you on CSS hacks!
Official Page: http://rafael.adm.br/css_browser_selector/
EXAMPLE
With this script you can set a different background color of one div for each browser.
- Internet Explorer - yellow
- Firefox - gray
- Opera - green
- Konqueror - blue
- Safari - black
Source of this example:
</pre>
DOWNLOADcss_browser_selector.js.txt (> 1KB)
Rename this file from .js.txt to .js before using
USAGE 1. Copy and paste the line above, inside and tag 2. Set the CSS attributes putting the code of the browserExamples:
Available Browser Codes:
- html.gecko div#header { margin: 1em; }
- .opera #header { margin: 1.2em; }
- .ie .mylink { font-weight: bold; }
INSPIRATION
- ie - Internet Explorer
- gecko - Mozilla, Firefox, Camino
- opera - Opera
- konqueror - Konqueror
- safari - Safari
Original idea by 37 signals.
http://37signals.com/svn/archives2/browser_selectors_in_css.php
TO DOLICENSE
- Rails plugin
http://creativecommons.org/licenses/by/2.5/
AUTHORRafael Lima (http://rafael.adm.br)
KEYWORDS css javascript script cascading style sheet cross browser cross-browser browsers bug ie internet explorer konqueror safari opera firefox hack tip trick