WordPress IE8 Fix for Display Problems

If you’re WordPress theme isn’t displaying the way it should in Internet Explorer 8 there may be a simple fix which isto put this line of code:

<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7? />

in your header.  “Hat tip goes to Ed Bott for writing about this in his post “Which sites will make the IE8 Compatiblity Hall of Shame”.

Yeah I know, if the world would just move to Firefox or any other working browser without the Microsoft ego that assumes the entire Internet world should bend to its will we wouldn’t have this problem.  However, as much as you may hate IE and while I may only use it for checking how Websites I am working on it render in it, the fact that 75% of your visitors are using it make coding for it a necessary evil.

Categories: WordPress Tags: ie7, ie8, WordPress

20 Responses to “WordPress IE8 Fix for Display ProblemsComment RSS feed

  • klxsitouchhelp
    April 16th, 2009 8:10 pm
    #1

    do i just add it as a meta tag or wat

  • David
    April 17th, 2009 9:15 am
    #2

    @klxsitouchhelp yep just copy it and drop it into the header.php above the closing head tag

  • Dave Gould
    July 29th, 2009 2:41 pm
    #3

    tried and failed. Probama template lastest ver of WP

  • web designer assistant
    April 6th, 2010 1:12 am
    #4

    I have tried this code and deactivated couple of plugins and it works like charm..thanks for posting..

  • HerBiVoRe
    May 28th, 2010 2:33 am
    #5

    Thank’s a lot for this line !!!

  • Seraph2Success
    June 30th, 2010 10:39 am
    #6

    my site doesn’t respond to the fix that you just offered. I am struggling to find any other methods of fixing the problem. the compatibility view in ie8 doesn’t even work on my site. I am going to pull my hair out!! Save me:)

  • David
    June 30th, 2010 11:14 am
    #7

    @Seraph2Success, what’s your site url? You may have to rebuild the theme.

  • Sam Modica
    August 8th, 2010 5:02 pm
    #8

    This really is really fantastic advice, many thanks.

  • James
    August 10th, 2010 10:44 am
    #9

    I’ve opened the PHP header file… I’m not really a code master… Is it ok to put it anywhere within the code? I don’t want to break the site or my boss won’t be happy… lol can someone guide me a little better… I looked for the “closing head tag” and I’m not seeing it. Is that just the last thing that says ?? Or do I need to put it somewhere else? Many thanks!

  • David
    August 10th, 2010 11:01 am
    #10

    @james, look for this:

    < / script>

    < / head>

    and put it between the two. The last one is the closing head tag.

    note, ive included extra spacing that doesn’t actually exist around the back slash of these two tags to get them to show here in the comment, but you want to keep it as is on yours.

  • Megan
    September 8th, 2010 7:20 pm
    #11

    I discovered that I had the ‘Zoom’ on at 125% and that this meant that the formatting ran over other blocks of text and Changing the zoom to 100% fixed this problem.

  • Rose
    November 8th, 2010 11:23 am
    #12

    Hello, I just used this in the header.php of my wordpress site to make it compatible with IE8…and it works…any thoughts….?

    function fix_ie8() {if (strpos($_SERVER['HTTP_USER_AGENT'],”MSIE 8″)) {header(“X-UA-Compatible: IE=7″);}}
    add_action(‘send_headers’,'fix_ie8′))();

    this was put right before the tag.

  • Rose
    November 8th, 2010 11:26 am
    #13

    ok in the post I just posted I added the entire code within an open and close script tag and placed the whole thing right before the closing head tag. I also placed a left paranthesis before the word function. I put those tags in the post but they were not picked up….

  • Amy
    December 14th, 2010 7:52 pm
    #14

    Same thing as Rose. I’d really hate to change my theme. Can someone check my site out and give me some tips (please!) to fix this? Much appreciated! :)

  • David
    December 15th, 2010 6:42 am
    #15

    Amy, you’re site looks great to me in IE8. Good job fixing it, and nice site.

  • Amy
    December 15th, 2010 9:11 am
    #16

    Thanks David! The changes I made oddly didn’t appear for an hour or so after making them! Thanks for the compliments on my site! :)

  • Sarah
    January 31st, 2011 2:06 pm
    #17

    Hey everyone-

    I put the tags in the header.php file and it still does not seem to be working. Compatibility View mode also doesn’t work. Does anyone have any suggestions for me?

    Thanks!

    Sarah.

  • Krissie
    April 3rd, 2011 8:17 pm
    #18

    I am having a SERIOUS problem with IE8 not displaying a cufon font in the submenu :( It works in every other browser and when I put IE8 in Compatability mode, but then the header spacing gets thrown way off. I tried this fix, but I’m not seeing any results. Would you have any idea what to look at? Thanks!

  • david
    April 3rd, 2011 9:01 pm
    #19
    Author's Reply

    Krissie, the following was offered by a colleague

    “http://cufon.shoqolate.com/generate/

    The notice at the top of the page – there is a newer engine for cufon that addresses several IE issues. This has been incorporated into the HDT framework already though.

    I HIGHLY discourage the use of cufon in dropdown menus SPECIFICALLY because how IE attempts to render objects after the DOM has been established. (which is piss poor, and very cpu intensive/crappy performance on most computers)

    You should almost always stick to a normal webfont or an @font-face font for anything that isn’t first rendered on the page. i.e. the top Nav is safe to use cufon.”

    For what it’s worth.

  • Liz
    June 2nd, 2011 4:00 am
    #20

    I have a wordpress blog in an inline frame on the home page of my html website. As I test the site offline before uploading changes (we’re on satellite broadband which is expensive and SLOW) I confess I never tested the blog online with IE8 – only Chrome and Firefox. When I finally looked at it today after my brother said something was wrong I found that the WordPress section flickers on and off in a random unstable way. I’m using the most recent WordPress upgrade.