I would guess it happens because the doctype is not exactly is it should be. Other browsers might be able to recognize it but IE falls back to quirks mode.
Please try the following:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Or one of the doctypes listed at W3C:
www.w3.org/QA/2002/04/valid-dtd-list.html
Here is a table that summarizes how browsers handle the doctype strings:
gutfeldt.ch/matthias/articles/doctypeswitch/table.html