How to fix alignment problems in IE 9

How to fix alignment problems in IE 9

The Problem

You have a beautiful, syntactically valid piece of html that SHOULD be aligned center in all browsers, and is aligned center in FireFox and Chrome, but refuses to align center in IE 9.

The Cause

I encountered this when I built the WordPress theme for this very blog.  The cause of alignment problems in IE 9 is that IE 9 wants to render the page in “Quirks” mode, even if the doctype is valid.  I’m sure there is a reason,  but the solution is so simple, who really cares?

The Solution

Just add the following bit of code into the system

<meta http-equiv=”X-UA-Compatible” content=”IE=9″ >

And quirks mode is gone!  The alignment problems in IE 9 are gone! It will now render properly in a modern format.

 

Written By Steve French

 

Comments are closed.





Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.