AARRGGHHH Posted October 14, 2022 Share Posted October 14, 2022 function hideElements() { document.getElementById('div1').style.display = "block"; document.getElementById('div2').style.display = "none"; document.getElementById('div3').style.display = "none"; document.getElementById('div4').style.display = "none"; document.getElementById('div5').style.display = "none"; hideScreenElements(); } How do I get the div that I'm hiding to stop taking up space when style.display = none? It's throwing off the vertical placement of a video beneath the divs that are set to none. Thank you Link to comment Share on other sites More sharing options...
Ingolme Posted October 14, 2022 Share Posted October 14, 2022 It doesn't take space when the display is "none", you should use the element inspector to see which element is actually taking up the space. Link to comment Share on other sites More sharing options...
AARRGGHHH Posted October 20, 2022 Author Share Posted October 20, 2022 Okay, makes sense. I'm guessing the "element inspector" is part of one of the major browser's troubleshooter. Which browser uses it? Where do I find it? Thank you! Link to comment Share on other sites More sharing options...
Ingolme Posted October 20, 2022 Share Posted October 20, 2022 On Windows, most browsers use the F12 key to open the element inspector. You can also find it by right-clicking anywhere on a page and selecting "Inspect" from the context menu. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now