• bartf

    (@bartf)


    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • webdressing

    (@webdressing)

    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 ??

    Thread Starter bartf

    (@bartf)

    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]-->

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditional comments ie6 ie7’ is closed to new replies.