Avatar of emsysindia
emsysindia

asked on 

<div> tag with style="visibility: hidden" occupying space in html page

Hi,
I made
 <div id="divId" style="visibility: hidden">
some text fields
</div>

When a button is pressed then its calling a javascript function and making the <div> tag visible by  document.getElementById("divId").style.visibility = "visible";

But the problem is when the page is loading initially(before button press ) the <div>  is not appearing but that much of space it is showing blank(the blank space will be occupied after btn pressed by div portion).

I cant change the position of <div>  as it will affect  functionally.

any solution.........
Java App ServersJavaScriptHTML

Avatar of undefined
Last Comment
rafe_

8/22/2022 - Mon