-6

Is there any way to Implement Browser specific css other than IE conditional comments..? I already tried with IE conditional comments,i wrote two css file one is specific for IE(css_IE.css) other one is for all the browsers(css_gen.css),have observed some the properties in css_IE.css are overridden by properties in css_gen.css file.

Jayababu
  • 1,641
  • 1
  • 14
  • 30
  • A CSS for IE doesn't make sense today. Recent versions of IE are very similar to standard browsers. If you really need to target some browser (which I doubt), the version is important. – Denys Séguret Oct 01 '13 at 10:32
  • You need to make sure that the IE specific CSS file is loaded *after* the generic one. Also, any selectors in the IE specific CSS need to be of the same or higher specificity as the generic one. – Olly Hodgson Oct 01 '13 at 10:32
  • @dystroy,i tried in IE8 and below versions – Jayababu Oct 01 '13 at 10:36

1 Answers1

3

Load the css_gen.css file first and then load the css_IE.css file.

<link rel="stylesheet" type="text/css" href="/css_gen.css">
<!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="/css_IE.css">
<![endif]-->

Hope that solves your problem.

And try this too http://css-tricks.com/how-to-create-an-ie-only-stylesheet/

Mevin Babu
  • 2,405
  • 21
  • 34