How to create dropdown menu in html css | Sololearn: Learn to code for FREE!

+2

How to create dropdown menu in html css

Dropdown menu

4/10/2021 1:20:44 PM

Azad Shami

7 Answers

New Answer

+5

<style> .dropdown { position: relative; display: inline-block; } .dropdown-content { display: none; position: absolute; background-color: #f9f9f9; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); padding: 12px 16px; z-index: 1; } .dropdown:hover .dropdown-content { display: block; } </style> <div class="dropdown"> <span>Mouse over me</span> <div class="dropdown-content"> <p>Hello World!</p> </div> </div>

+2

https://www.w3schools.com/howto/howto_css_dropdown.asp

+2

Use select and option tag.

+2

Read 25.1 lesson jQuery course or use Bootstrap component.

0

Hi! A simple way to get a dropdown menu in html is use the <details> tag, is you want to name it, use the summary tag

0

https://code.sololearn.com/WvslQ5N6f8Xg/?ref=app https://code.sololearn.com/WFOrP8KlApxC/?ref=app

0

Follow this: https://code.sololearn.com/WsuueHRODa69/?ref=app