Forums

Conditional comments ie6 + ie7 (4 posts)

  1. bartF
    Member
    Posted 1 year ago #

    Somehow I can't get the conditional comments for ie6 and ie7 working for my theme. I put the following code in the header of my theme

    `<link rel="stylesheet" href="wp-content/themes/mytheme/style.css" type="text/css" media="screen" />

    <!--[if lte IE 6]>
    <link rel="stylesheet" href="wp-content/themes/mytheme/ie6.css" type="text/css" media="screen" />
    <![endif]-->
    <!--[if IE]>
    <link rel="stylesheet" href="wp-content/themes/reimer/ie7.css" type="text/css" media="screen" />
    <![endif]-->'

    Hope someone can tell me what i'm doing wrong. This code always worked for me in other websites.

  2. webDressing
    Member
    Posted 1 year ago #

    We place all of our ie code in a separate CSS file named ie6.css and ie7.css. One day maybe people will realize how bad ie is and switch to another browser, and then coders won't have to make special conditionals just for ie :)

  3. bartF
    Member
    Posted 1 year ago #

    Well.. i do exactly the same. I've changed the code a bit and ie7 does work righht now. But I still can't get ie6 to work

    <style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_url'); ?> );
    </style>
    
    <!--[if lte IE 6]>
    <style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_directory'); ?>/ie6.css );
    </style>
    <![endif]--> 
    
    <!--[if IE 7]>
    <style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_directory'); ?>/ie7.css );
    </style>
    <![endif]-->
  4. mariostella
    Member
    Posted 1 year ago #

    Try with <!--[if lt IE 7]>

Topic Closed

This topic has been closed to new replies.

About this Topic