In IE6 if you have anything before the DOCTYPE (including the xml prolog) it throws the browser into quirks mode, meaning the box model renders in the old, incorrect/buggy way. (Microsoft actually did that on purpose to allow documents to validate but still remain compatible with hacked legacy code.)
I didn't look closely, but I'm guessing from the description and a quick look at your code that that's your problem. Remove the xml prolog and you should be OK (or put quirks mode hacks for IE6 and lower ). Or use an html doctype instead.