dynamic page resize

I have a dynamic article page set upon editor x. The various fields are not always populated as there are differing amounts of images and text for each article. (see screenshots)This leads to masses amounts of spare space at the bottom of the page before the footer. What code do I need so that the dynamic page can resize according to how much content is in each article?
Many thanks!