• Resolved creativelifeform

    (@creativelifeform)


    Hi all,

    I use the method described on this site to have different stylesheets for the various IEs. I’m just wondering if this can work with a WordPress install?

    Currently I’m trying this but it ain’t workin

    <!--IE sucks-->
    <!--[if gte IE 8]>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie-8.css" />
    <![endif]-->
    <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie-6.css" />
    <![endif]-->
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie-7.css" />
    <![endif]-->

    Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sure, this works just fine with WordPress themes. But the template tag that you are using can be problematic as the link is relative to your main stylesheet’s location.

    You should have better luck using the template_url tag which covers the entire theme, not just the main stylesheet:

    <?php bloginfo('template_url'); ?>
    Thread Starter creativelifeform

    (@creativelifeform)

    Hi, thanks jleuze, I didn’t change anything and its working now. Stupid IETab for Chrome…I don’t think its so accurate…when I test in IE8 its fine, but if I test in IETab…no go.

    Noted about template_url, I usually put my css directory where the main style.css is located anyway but that’s good to know. Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using alternate stylesheets for IE’ is closed to new replies.