Jump to content
On 5/26/2019 at 8:29 PM, Joshcanread said:

I'm trying to make a dropdown box but the things are showing up outside the box.

code1.html

The links need to be inside the myDropdown div, whose visibility is controlled by when the user clicks the button, or where you add/remove them based on the button (I suggest visibility as it's simpler).

Also neither of your divs are close 

</div>

 

 

Suggest looking here

https://www.w3schools.com/jsref/prop_style_display.asp

 

Set style.display to "none" to make it invisible, and to "block" to make it visible.

 

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×