Invalid doctype triggers quirks mode, this leaves all the rendering decisions to the browser.
Basicly your browser saying, hmm ill see what i can do with this.
IE is good at guessing what you would like to see since they have a long history of non-compliantness.
If you want to have it look the same in different browsers don't go there :)
But to try and answer you question:
First example you mix 80px (left and right both 40px) padding with %width (20% + 74% = 94%) which means you'll be getting in trouble with the width when the browser is less than 1333 pixels.
I haven't taken tho 20px margin on the content into account here but you get the idea.
In the second example you didn't set a height in the CSS, if you set it to 30px or something like that it works.