visibility:hidden hides the element, but it still takes up space in the layout.
display:none removes the element from the document. It does not take up any space.