PDA

View Full Version : Triggering IE quirks mode


Erica C.
11-23-2006, 03:36 PM
In my XHTML class, I learned that I should put my doctype declaration at the top of the page, and that I should put this: <?xml version="1.0" encoding="iso-8859-1"?> right before it. Then I found out that this triggers quirks mode in IE. It means that the border around the navigation here (http://www.risingstarquilters.org/) is half the size it should be when viewed in IE. I can live with that. But it also is screwing up the margin size of a column on a page I'm working on right now. Since I want to have two columns of about the same width side by side, it's noticable.

Is there a way to follow the rules and still have my columns display reasonably in IE?

If not, will using a workaround for IE > 7 mess things up in IE 7? (I don't have IE 7 to test in.)

Thanks!

Erica

Arthur
11-23-2006, 04:05 PM
Because you have not written your page in XML but in transitional XHTML, you can drop the XML prolog and insert a Content-Type element in the headers to specify the character encoding. This'll put IE6 in (almost) strict mode. IE7 will be in strict mode even if you add the XML prolog.


Quirks mode and strict mode (http://www.quirksmode.org/css/quirksmode.html)
XML prolog (http://www.d.umn.edu/itss/support/Training/Online/csstips/xml_prolog.html)
CSS for Internet Explorer 7 (http://www.webcredible.co.uk/user-friendly-resources/css/internet-explorer-7.shtml)


-Arthur

Erica C.
11-23-2006, 04:18 PM
Thank you!

(May be back with more questions after I read the articles.)

Erica