If you remove padding , margin and border (which you did not mention in your question), the height will be 0px and you will not see anything in the browser. Check out the screenshot below and the offsetHeight value. 
For example, you can create another div below #test , and then add display:none for #test , you will see that the position of the second div does not change.
source share