'drop-down menu on the left sidebar
I'm trying to make a submenu that appears on the right side of the main menu, I've already made the menu but can't display the submenu correctly, can you please help me
Solution 1:[1]
It is better that you upload your code. However i think you mean something like this (try it):
<html>
<head>
<style>
.DropDownMenu-Content {
position: absolute;
min-width: 105px;
display: none;
box-shadow: 0px 8px 16px 0px lightgreen;
}
.DropDownMenu-Content a {
display: block;
text-decoration: none;
padding: 1rem;
}
.DropDownMenu:hover .DropDownMenu-Content { display: block; }
.DropDownBottom {
background-color: green;
color: white;
border: none;
font-size: 16px;
padding: 1rem;
}
</style>
</head>
<body>
<h1>Dropdown Menu</h1>
<div class="DropDownMenu">
<button class="DropDownBottom">Dropdown</button>
<div class="DropDownMenu-Content">
<a href="">First</a>
<a href="">Second</a>
<a href="">Third</a>
</div>
</div>
</body>
</html>
Hope this helpful.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ali |
