I believe you're running into a CSS behavior called "collapsing margins", which I truly know nothing about. A quick fix is to give "#D p" an intervening element to work against. I inserted:
just after the <div id="D"> tag and got the effect I think you want. But I'm sure the proper method lies somewhere else, so you should investigate collapsing margins and see how they work. Good luck!