Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- IE & Doctypes (esp for newbies)
February 4, 2009, 7:44 am
rate this thread
I just wanted to share a major discovery (for me) which after about 5
years of web site building I didn't realise.
If you use the HTML doctype for Transitional HTML then the page will
render in Quirks mode (where the box model is broken). However (and
this is the BIG discovery (for me)) - if you use a Strict HTML doctype
then the page actually renders in Standards mode.
I've never really spent long playing with DOCTYPEs to discover this
and maybe just havent read that much about it - still applying hacks
to my CSS to get it working with Transitional.
I've read about triggering Quirks mode - but never realised (that
including IE7) this could be done from the DOCTYPE parameter.
Maybe I'll have to rethink my doctypes!
Re: IE & Doctypes (esp for newbies)
Oh my. Where have you been? :-)
Not quite. There is also "almost standards mode" and it does not entirely
depend on transitional/strict, it also depends on the presence of a system
You will, however, never get fully standards mode across all browsers, table
cell hight being the problem.
Why are you using transitional anyway? Are you transitioning from some
The doctype *is* what defines standards/quirks/almost mode.