How to hide elements without having them take space on the page? October 1, 2022 by Tarik Try setting display:none to hide and set display:block to show.