Sunday, December 30, 2012

Targeting CSS to a specific browser (IE, Firefox and Chrome)


Here is how to tackle three different browsers: IE, FF and Chrome. which will make your page much more likely to fail on the next browser updates.
    <style type='text/css'>
/*This will work for chrome */
#categoryBackNextButtons
{
width:300px;
}

/*This will work for firefox*/
@-moz-document url-prefix() {
#categoryBackNextButtons{
width:300px;
}
}
</style>
<!--[if IE]>
<style type='text/css'>
/*This will work for IE*/
#categoryBackNextButtons
{
width:300px;
}
</style>
<![endif]-->
Disqus Comments