Forums

[resolved] IE conditional CSS not working in child theme (3 posts)

  1. mackhina
    Member
    Posted 10 months ago #

    Hey all

    I have added the following code to my header.php file and then added a file called IE7.css into the of my child theme, but for some reason in IE7 it doesn't seem to be picking up the conditional CSS and just keeps using the standard CSS file.

    <!--[if IE]>
        <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/IE7.css" type="text/css" media="screen, projection" />
    <![endif]-->

    Would anyone be able to see what I am doing wrong? The parent theme is comicpress and the website is mackhina.com.

    Thanks in advance for any help you can provide.

    Cheers

  2. alchymyth
    The Sweeper
    Posted 10 months ago #

    where is the IE7.css located?

    your link is pointing to the parent theme folder;

    if it is in the child theme folder, try and use:

    <!--[if IE]>
        <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/IE7.css" type="text/css" media="screen, projection" />
    <![endif]-->

    http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri

  3. mackhina
    Member
    Posted 10 months ago #

    The stylesheet was in the child theme so that would explain it hopefully! I'll give it a shot when I get home. Thanks heaps for your reply!

Reply

You must log in to post.

About this Topic