IE 7-specific PHP Detection
-
One of the blogs that I manage is using the discontinued Wuhan theme. It uses the following if/else statement to direct IE users to a special style-ie.css stylesheet, which is essentially a copy of the main stylesheet with corrections for IE errors:
<?php if (eregi("MSIE",getenv("HTTP_USER_AGENT")) ||<br /> eregi("Internet Explorer",getenv("HTTP_USER_AGENT"))) { ?><link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/style-ie.css"/><br /> <?php } else { ?><br /> <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/style.css"/><br /> <?php } ?>
This IE-specific stylesheet is necessary for IE versions 5 and 6, but practically destroys the blog’s appearance under IE 7. Is there any way to re-write the if/else statement to be specific to all IE versions, except 7?
The blog in question is: https://sarahwallinhuff.com/
Thanks in advance!
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘IE 7-specific PHP Detection’ is closed to new replies.