Firstly, the best thing you can do is try to drop the requirement for Quirks mode. It doesn't just change the page layout, it also switches off all of the modern browser features.
This will give you problems if you want to use any of these modern features. (note that quirks mode is an IE5-compatibility mode, so "modern features" means pretty much anything invented since IE5!). For this reason, I strongly recommend if at all possible that you consider switching the site so it works in Standards mode.
The main reason for using standards mode is to future-proof your code. IE's bad reputation is due to old versions and features like quirks mode, and in recent versions of IE, Microsoft are trying to move away from the past. I would not be surprised to see quirks mode disappear from the browser at some point in the future.
In addition, using standards mode will allow your site to work properly in all other browsers. In Quirks mode, your site will only ever work properly in IE.
The good news is that switching a site from quirks mode to standards mode is often a lot less work than it sounds. The main thing you need to know about is a CSS feature box-sixing
. This allows you to use the quirks mode layout model while still keeping the site in standards mode.
Add the following to your CSS:
* {box-sizing:border-box;}
This shuold hopefully fix the majority of the layout issues that you're getting switching from quirks mode to standards mode, and should allow you to stay in standards mode.
The remainder of the layout issues are likely to be caused by bugs in IE5 that have been fixed in subsequent IE versions but left in quirks mode for compatibility reasons. You will probably need to fix these manually. But hopefully there won't be too many of them.
Okay, so if you're still reading, I'm going to assume that the above isn't good enough for you, and you really do want to stick to quirks mode.
Putting a site in quirks mode is fairly easy in IE: Just drop the DOCTYPE declaration.
When IE sees a site that doesn't have a doctype, it automatically assumes that it should render it in quirks mode.
As I say, I strongly recommend not doing this, but if you absolutely have to, that's how to do it.