How to make a drop down button that when I click on it, it shows me several elements that I have put? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to make a drop down button that when I click on it, it shows me several elements that I have put?

I used the search for this application and searched the internet for the answer but I have not had any results that have worked for me if you can help me I would really appreciate it

6th Nov 2020, 11:38 AM
JohanAntonio Gutiérrez
JohanAntonio Gutiérrez - avatar
5 Answers
6th Nov 2020, 11:52 AM
Simba
Simba - avatar
+ 7
css is required for that.You can use the hover of css.
6th Nov 2020, 7:29 PM
Minhazur Rahaman Ratul
Minhazur Rahaman Ratul - avatar
6th Nov 2020, 11:50 AM
Azhagesanヾ(✿)
Azhagesanヾ(✿) - avatar
+ 5
You can make the drop down button by using a main element like div containing other elements like a span or other ones Then just keep that main elements height set to 0 ,and when you click on it set it height to whatever you want
6th Nov 2020, 11:50 AM
Abhay
Abhay - avatar
+ 5
This is a live example in JavaScript, where the drop down button will be implemented into a navbar: https://code.sololearn.com/WLpJTMTqV4Bl/?ref=app
6th Nov 2020, 12:51 PM
JaScript
JaScript - avatar