Search code examples
cssinternet-explorer-8conditional-statementscss3pie

conditional css is not working to target IE


i'm trying to create border radius for some divs and want them to work on IE too so i'm tryin to use CSS3 PIE. I want to target browsers less then IE9 but it's not working at all

<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="../assets/css/ie.css"/>
<![endif]-->
<link rel="stylesheet" type="text/css" href="../assets/css/main.css"/>

the last one is the main stylesheet but when i open ie.css and save any style it doesn't work at all. The page loads without any stylesheet On IE as it's not attached to the html page

Any solution ?


Solution

  • You need to have the ie.css overwriting the main.css

    try

    <link rel="stylesheet" type="text/css" href="../assets/css/main.css"/>
    <!--[if lt IE 9]>
    <link rel="stylesheet" type="text/css" href="../assets/css/ie.css"/>
    <![endif]-->