Introduction

Users face problems for formatting CSS in a different browser. Some CSS attributes support by particular browser but other browser does not support. So in this blog, I will tell you how we use different CSS for different browsers.
In the sample application, I created two style sheet IE8.css and IE9.css. IE8.css will be work for IE8 browser and IE9.css will be work for the IE9 browser.
How to achieve this, I gave the reference of both StyleSheet by the line given below:
  1. <!--[if IE 8]>
  2. <link href="IE8.css" rel="stylesheet" type="text/css" />
  3. <![endif]-->
  4. <!--[if IE 9]>
  5. <link href="IE9.css" rel="stylesheet" type="text/css" />
  6. <![endif]-->
When you will run the sample application it will show the font color red in IE8 and blue IE9.