I have a DIV element on my webpage that I would like to collapse and expand depending on different links that the user clicks. I started out by setting the DIV element's style="visibility:collapse", but that didn't hide the contents of the DIV. I then tried style="visibility:hidden", which hides the contents, but leaves the blank space occupied by the content. After a bit of googling, I tried replacing the DIVs with table structures, but that didn't work either.
What exactly is "visibility:collapse" supposed to do? Should I be using it with something other than a DIV or table?
What exactly is "visibility:collapse" supposed to do? Should I be using it with something other than a DIV or table?