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";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.Code:document.getElementById(a).style.visibility = "visible";
Using height property is not helping.
Is there any way I can gain that space when an element is hidden?Code:document.getElementById(a).style.height = 0+"px";




Reply With Quote