I know this question has been asked 100x but I can’t seem to find a solution in the other articles. I have gone through many support questions on here and other sites without resolve. I’m trying to add conditional IE statements to my WordPress theme for version 8 and under and then for 9. Here’s what my head section looks like (not sure why it’s not all showing one block of code on here.. sorry about that):
<!--[if lt IE 9]>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/ie.css" media="screen" type="text/css" />
<![endif]-->
<!--[if gte IE 9]>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/ie9.css" media="screen" type="text/css" />
<![endif]-->
I have tried just one statment using with no luck.
I also tried a direct link the css using the full URL.
When the page loads I see the way it should look using the ie.css (mainly I changed the background so it was obvious) and then it quickly changes to my default stylesheet. When I inspect using Firebug it shows it using the default stylesheet.
Any ideas?
thanks.
*****UPDATE****
I guess I needed to step away for the weekend. I realized today that the page I had been looking at was my home.php page I had set in WP. That was the only page on my site that wasn’t using the header.php file and had it’s only link to the stylesheets. Thus once I added the conditional statements to that page, it sees the IE style sheets now. I feel like a bonehead, but sometimes taking a step back can be the best answer. Thanks for the other replies though!
I realized today that the page I had been looking at was my home.php page I had set in WP. That was the only page on my site that wasn’t using the header.php file and had it’s only link to the stylesheets. Thus once I added the conditional statements to that page, it sees the IE style sheets now. I feel like a bonehead, but sometimes taking a step back can be the best answer. Thanks for the other replies thou