Reading IE css on server

i have a wordpress based website and when i was working on localhost, i was using this code to read the css:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
<!--[if IE]>
    <link rel="stylesheet" href="<?php echo get_stylesheet_directory()."/ie.css"; ?>" media="screen" type="text/css" />
<![endif]-->

As you can see, the second part of the code is to change the css when i'm viewing the site on Internet explorer. It happens this was working perfectly on xampp but now, after migrating por an online server, the second part of the code is not working, the styles are not applyed when i see the online page on IE.

Any hints why this is happening?

Answers


 <?php get_stylesheet_directory() ?>

Returns an absolute server path;

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

Change your code to;

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

And it should work for you.


Need Your Help

javascript regex syntax highlighter

javascript jquery regex

I have made my self a custom javascript syntax highlighter

bitmap with reduced number of colors — shouldn't its size decrease?

c# image-processing

i have an algorithm that reduces the number of colors in a picture. I than save the picture with reduced number of colors(32 colors) as jpg. But the new jpg has the same size as the old.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.