[RESOLVED] hiding element
I have a table enclosed in <div> tag. With a click of button, the hidden attribute toggles between hidden and visible.
Code:
document.getElementById(a).style.visibility = "hidden";
Code:
document.getElementById(a).style.visibility = "visible";
Hiding and displaying works well, but when the element is hidden, there is still large blank area that is visible. By hiding the element, I want to gain that space too.
Using height property is not helping.
Code:
document.getElementById(a).style.height = 0+"px";
Is there any way I can gain that space when an element is hidden?