Does it work if you hard code it?
example
<!–Provides stylesheet to be used if browser is IE–>
<!–[if IE]>
<style type=”text/css” media=”screen”>
@import url( http://yeleek.co.uk/wp-content/themes/yeleek/iestyle.css );
</style>
<![endif]–>
<link href="<?php echo get_stylesheet_directory_uri(); ?>/iefix.css” rel=”stylesheet” type=”text/css” />
This is wrong. Should be:
<link href="<?php echo bloginfo('template_directory'); ?>/iefix.css" rel="stylesheet" type="text/css" />
get_stylesheet_directory_uri(); – I don’t know where you got that from.
I tried both solutions and they don’t seem to work.
Is there anything else that could be causing the problem? Check the URL above, it loads the code and the link to the IE fix is correct!
I’m having trouble with this same issue on my site.
In my header, I’ve added the following:
<![if !IE 7]>
<link href=”<?php echo bloginfo(‘template_directory’); ?>/ie7.css” rel=”stylesheet” type=”text/css” />
<![endif]>
<link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
In my template directory, I have two style sheets, the standard style.css stylesheet, and one named ie7.css. When I load my site in IE7, it doesn’t call the ie7.css stylesheet.
However, if I remove the standard style sheet call (by that I mean this code: <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />), it does call the ie7.css style sheet.
My site is here: http://idratherbewriting.com/simplx.
@subfusion: I do not think you have this right. An IE conditional should go:
<![if IE]>
You seem to be confusing it with a comment with !– etc.
Updated, still doesn’t seem to work.
Hi,
Just looking – it seems that you are trying to fix the png issue. Just wondered if you set it to something else ie making text bold does it work then? i.e. is the issue the iecss not loading properly or is the issue in the png fix??
For the png fix look at this – i’m using it in my header and no worries.
PNG Fix
Your formats are incorrect.
<![if IE]>
stuff here
<![endif]>
is incorrect.
<!--[if IE]>
stuff here
<![endif]-->
is how it should be.
You should also place your IE stuff *after* ALL other stylesheets, to ensure that the IE stuff is overwriting what comes before it.
And also, IE 7 also already supports the transparent PNGs, so it should be:
<!–[if lte IE 6]>
stuff here
<![endif]–>