January 2012 - Digital Tool Factory blog January 2012 - Digital Tool Factory blog

The Digital Tool Factory Blog

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.


31
Jan 12


Written By Steve French

 

The how to fix series

I’ve done this elsewhere – but I’m going to start documenting any odd technical problems that take me more than 15 minutes to solve, largely so I have a reference when I have the same problem again.  Everything will be in a  “The Problem, The Cause, The Solution” format. There will be many posts in the how to fix series I assure you.


30
Jan 12


Written By Steve French

 

No one ever told me that making WordPress themes would be this easy

Had I known, I would have started years ago…


17
Jan 12


Written By Steve French

 




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