|
Tuesday, May 12, 2009
CSS Compatibility Mode Fix for Internet Explorer 8
My recent post about IE8 has launched it’s ugly head.
A client of ours contacted us to let us know after they downloaded the new Internet Explorer 8 there site looked messed up.
Knowing this was going to be a problem, Microsoft created a button called ‘Compatibility View‘ so users could view websites in the older version of their browser.
But this was not a work around for our client.
Instead of fixing (or hacking) all the code on the website I added the following code recommended by Microsoft:
<html>
<head>
<!-- Mimic Internet Explorer 7 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
<title>My Web Page</title>
</head>
<body>
<p>Content goes here.</p>
</body>
</html>
It worked!
This is truly a work around – a Microsoft work around. Microsoft knew full well that their new browser couldn’t view perfectly good standard coded websites, so they had to come up with a way to view websites as if you were using their old browser.
What a joke. It’s no wonder why Microsoft is losing market share to Firefox and Apple.
Posted by: Michael Swartz at 6:23 pm
Comments: 20 Comments | Filed under: HTML, Web Design
|
20 Comments Add your own
1. Mike | June 3rd, 2009 at 11:25 am
Ya baby!! You are the man! I’m having the same issue with my clients site and you solved my problem with a 2 second google search.
Thank you!!
2. Michael Swartz | June 3rd, 2009 at 11:36 am
Excellent!
Glad to hear the code helped you out. I knew others would have the same issue.
Thanks for letting me know you found my post via a Google search. I titled my post hoping people would find it easily. I initially had to do some deep searching on MSDN to find this fix.
3. sourabh | June 9th, 2009 at 3:45 am
website looks bad in ie7 and other browser but look ok in ie6 so help me out…
4. Michael Swartz | June 9th, 2009 at 8:39 am
Hi Sourabh. Your website looks fine in IE7 over here.
5. Cole | June 19th, 2009 at 8:12 pm
Thanks for writing this article Michael, I’d had the same problem on my site, although visibly it looked fine in IE8.
It’s a shame that Microsoft insist on new technologies that make everyone else look bad.
After browsing around I found facebook were using the same work around.
6. Michael Swartz | June 22nd, 2009 at 8:43 am
Hi Cole.
You’re welcome. I’m glad you found the article helpful. I knew there would be others who would need this information. Amazing how Microsoft buried this ‘hack’.
Interesting about Facebook.
Thanks for you comments.
7. David Waithaka | July 16th, 2009 at 6:43 am
Had the same problem on my site. After a few unsucessful attempts to fix the problem, I googled the fix and came across this article. The fix works great. Thanks
8. Markus Steiger | July 19th, 2009 at 9:24 am
Thanks! This way I have solved a GoogleMaps Pedometer problem at Camburi.tv
9. Michael Swartz | July 22nd, 2009 at 3:56 pm
Hi David and Markus.
You’re welcome. I’m glad to hear this corrected your issues.
10. Chris Washington | July 26th, 2009 at 10:07 am
Okay… this doesnt seem to work for me… not quite sure why… I added the code and all it did was take away the compatability icon away at the top of the page, but it still looks the same… It looks great on all other major browsers (Firefox, Safari, Chrome, and Opera )… However when I hit the compatability view icon it works perfectly… why the difference in behavior
11. Michael Swartz | July 28th, 2009 at 9:03 am
Hi Chris.
Not sure why it’s not working for you. I know it takes away the compatibility icon, but it should also emulate IE7. Please list your URL and maybe I can take a look at it.
12. Jim | August 26th, 2009 at 8:50 am
Thanks – saved me a bunch of time. Too bad microsoft can’t is so fouled up that this stuff has to happen
13. Gustavo | September 1st, 2009 at 5:11 pm
Thanks a lot!!!! I’ve been struggling with this all day.. this worked awesome.. I can go to sleep now…
Thanks again!
14. Jacob | September 16th, 2009 at 3:23 pm
Thanks for the foot work Michael. I wish Microsoft would get it together with their browser. I personally stopped using IE a long time ago, however when developing websites you have to develop for the masses. The masses still use IE.
15. chris | September 17th, 2009 at 10:35 am
I my god. What a post. You are so wrong about this part:
“Microsoft knew full well that their new browser couldn’t view perfectly good standard coded websites”
Internet Explorer 8 is much better with good standard coded websites. You’re code is just s*** and not standard at all. My sites works perfectly in IE8 with good standard codes, only ie7 and ie6 needed some fixes.
16. Michael Swartz | September 17th, 2009 at 2:30 pm
Chris. I was talking about IE7, not IE8. I agree IE8 is better, but Microsoft built IE8 with compatibility mode because they knew websites would look and act differently.
17. Jay | November 5th, 2009 at 7:29 pm
Actually you’ve developed your site for IE7, using some of the non-compatible css features. IE8 doesn’t support all of IE7’s non-compatible features.
18. Jesus | December 15th, 2009 at 4:09 am
Hey Michael!!! thank you so much for informing us all!! this really helped me as I was checking my website in all popular browsers and noticed explorer was displaying my content differently but in compatibility mode it was great! thank you for the code! it took me 1min at the most to find your post! =D thanks!!
19. Tony | December 25th, 2009 at 7:31 pm
This seems to be a great fix for most but it doesn’t work for forum posts. On my forum, whenever I (and some members) try to write a long post, the screen bounces back up and it’s impossible to see what you’re typing
20. Karlsse | February 5th, 2010 at 9:02 am
i am a firefox user more than an internet explorer user but it seems that Internet explorer 8 is very stable and it its loading time for webpages is faster too.
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed