Question:
I have a JavaScript function that hides a div and opens when clicked. For some reason when I launch the website my header has this huge gap and when I show the div it disappears. How do I make it disappear? Much appreciated
Repl link:
https://replit.com/@ZainIbrahim1/Javascript#
Hey @ZainIbrahim1 welcome to the forums!
Use display: none;
in your CSS file, it hides the element and removes the space it takes up. Hope this helps!
1 Like