Works on IE - finally
Posted by Sayamindu 2 years ago
Of late, some of my friends, who had been accessing my blog from the college lab were complaining that the design of the site was awful - much to my surprise. I decided to investigate today, and found the following snipped of code in the header.php file of the Wuhan theme (which is the default theme in this site):
<?php if (eregi("MSIE",getenv("HTTP_USER_AGENT")) || eregi("Internet Explorer",getenv("HTTP_USER_AGENT"))) { ?><link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/style-ie.css"/> <?php } else { ?> <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/style.css"/>
Somehow, I had forgot to upload the file style-ie.css to the Wuhan directory, and so all IE users were seeing the site devoid of any CSS - no wonder it appeared “badly designed”.
After uploading style-ie.css, I looked up in my Yahoo! buddy list for anyone who could test the site (I don’t have windows in any of my computers), and found Ashikur-da. He sent me a screenshot of the site being rendered propely in IE - so I guess IE users would be satisfied now :-). In case of any cases of weird/unexpected rendering, please do let me know.










