Likely you have an unclosed tag in your header insert (or through a modification of a template); remember that if you open a tag, always be sure to close it...
Ex: Open Link:
<a href="http://www.yoursite.tld">
Closing Tag:
Not sure why removing the doctype would fix it; it shouldn't really have much effect at all...