I have JavaScript code that hides a tag when it is clicked:
document.getElementById("div").style.visibility="hidden";
Although when I do this, even though the div tag is hidden, there is still a space where the div tag is located. how do I collapse the whole div tag using JavaScript?
Use: