Jump to content


Recommended Posts

Hello, @Gentle7

Try this code to implement Dropdown:

<!DOCTYPE html>
.dropbtn {
  background-color: #4CAF50;
  color: white;
  padding: 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;

.dropdown {
  position: relative;
  display: inline-block;

.dropdown-content {
  display: none;
  position: absolute;
  background-color: skyblue;
  min-width: 111px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;

.dropdown-content a:hover {background-color: #f1f1f1}

.dropdown:hover .dropdown-content {
  display: block;

.dropdown:hover .dropbtn {
  background-color: #3e8e41;
<h2>Dropdown Menu</h2>
<div class="dropdown">
  <button class="dropbtn">Mobile List</button>
  <div class="dropdown-content">
  <a href="#Apple">Apple</a>
  <a href="#Samsung">Samsung</a>
  <a href="#Sony">Sony</a>
  <a href="#Mi">Mi</a>
  <a href="#Realme">Realme</a>
  <a href="#OnePlus">OnePlus</a>
  <a href="#Intex">Intex</a>
  <a href="#Micromax">Micromax</a>

I hope above code will be useful for you.
Thank you.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...