I recently made a website but I’m having a really big problem with Internet Explorer. The CSS seems to do strange things in IE.
Rather than copying hundreds of lines of CSS here is a link to a page of the site: http://www.appwheal.com/app/ios/angry-birds-space
All the content should be displayed in the middle of the screen. Instead with IE it is stuck to the left.
I’m using
margin-left: auto;
margin-right: auto;
This is supported by IE, right.
Please help and thanks in advance.
You need to declare a
DOCTYPE, or Internet Explorer defaults to Quirks mode (IE5 compatibility). Go into Internet Explorer, hit F12 to bring up Developer tools, and notice that it shows “Quirks” mode under Document Mode. Quirks doesn’t support any of the known div centering methods around, and declaring the DOCTYPE is the easiest (and recommended) way to fix it.To set your page for XHTML 1.0 Transitional (which is the most common), use
To declare the page is HTML5 compatible, use
The
DOCTYPEline needs to be the first line in the html file, appearing BEFORE the opening<html>tag.