tags:

views:

68

answers:

1

I'm having problem with CSS where, when I run on Mozilla Firefox the CSS is doing fine. But when I run inside Internet Explorer, the CSS is not working. When I try to change the code in the CSS file, it works otherwise. Mozilla is OK, but Internet Explorer is not.

I have an idea calling 2 different CSS. For example, style_IE.css and style_moz.css. Both CSS files will be called from header.html.

How can I fix this problem?

Is there some code that can distinguish between browsers? Whenever the user is running in Internet Explorer, then style_IE is called if not it otherwise.

+3  A: 

You need to use IE conditional statements.

  <link href="style_moz.css" rel="stylesheet" type="text/css" />
  <!--[if IE]> <style type="text/css">@import "style_IE.css";</style> <![endif]-->

The latter will be used when the browser is Internet Explorer; ignored otherwise.

Sarfraz