how to specify different css for ie

Tags: css,internet-explorer,cross-browser

Problem :

I need to include different .css files for IE anf all other browsers.

I tried the following but it doesn't work.

<!--[if !IE]><!-->
<link type="text/css" rel="stylesheet" href="css/my_style.css">
<!--<![end if]-->
<!--[if IE]><!-->
<link type="text/css" rel="stylesheet" href="css/my_style_IE.css">
<!--<![end if]-->

Solution :

You can give css path this way for IE condition.

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

You can get better help from below link.

Enajoy...!! :)

    CSS Howto..

    How do I link JS file from other folder to a page?

    How do I remove applied css on a div by JQuery?

    How to add a hiding delay to Full CSS Dropdown Vertical Menu

    How can I “display:none” to some adjacent text with CSS?

    how to make a responsive website using html/css and javascript [duplicate]

    How do I add a horizontal submenu?

    How to place the block on the top of “second” screen using CSS?

    How to make a
  • link visited with css
  • How to give effect on dragging in css or through jquery

    How can I make this image responsive?

    newbie css/php question - how to get a div between a label and an input with cakephp

    How to make visual changes with dynamically generated HTML code?

    How make text before ul to come in single line in html?

    How to match columns in a scrolling table with fixed headers

    how do I modify a :hover style using JavaScript / jQuery?

    How specify two css classes: from property and conditional class

    how to show like chat box for the div/p tag top left/right corners

    How to switch left and right in a css file?

    How to style author id in WordPress?

    How to do centered

    on both sides over a background image

    How to align images to the bottom with css?

    SCSS / Sass: How do i change a mixin to output specific CSS?

    How can I float right two span tags on different lines?

    How to change width of object in mobile version

    How to apply StyleSheet to MVC3 website?

    How is the scroll effect achieved in this webpage?

    How to stylize left part of input range in Metro Apps?

    How can I make it so the first element in a DIV has a different CSS to others?

    How to put four images 2x2 on other image as background, CSS?

    How do I change the css of a different element on hover?