You can use the display property of style. Intialy set the result section style as
style = "display:none"
Then the div will not be visible and there won't be any white space.
Once the search results are being populated change the display property using the java script like
document.getElementById("someObj").style.display = "block"
Using java script you can make the div invisible
document.getElementById("someObj").style.display = "none"