This is caused by the line-height of the top and bottom divs being larger than the height of the div.
If you set the style of the top and bottom divs like this, you should get the desired results:
<div id="top" style="line-height:5px">
<div id="bottom" style="line-height:5px">