|
Project Information
Links
|
OverviewThis is a JavaScript tool for detecting the users browser and setting a selector based on what browser and version is being used. For example if the user is using Internet Explorer 6 the body selector is set to class="ie6". So now instead of the following CSS hacks: #mainContainer{
margin:0px 30px;
_margin:0px 15px;
}We now can have nice clean css: #mainContainer{
margin:0px 30px;
}
.ie6 #mainContainer{
margin:0px 15px;
}In this version I have detection for all versions of Firefox, all versions of Internet Explorer, all versions of Safari and all versions of Opera. Implementation1. Download the latest version css_browser_identifier.js 2. Include this javascript file in your page. 3. Call the function initCssBrowserIdentifer() on page ready |