Have you tried placing both elements in a parent div to control there length together.
The body element allows for elements within to act alone. You have to specify a separate body to control them together.
Basically body is a controlled open space all elements inside act on there own : a div is needed to control more then one element together. Setting there limits and max together by using the parent.
mind you auto does nothing for height. in body or parent div.