Skip to content

Commit

Permalink
commit 0004
Browse files Browse the repository at this point in the history
  • Loading branch information
Isodoro committed Sep 19, 2024
1 parent 49ad23c commit 91e6a59
Showing 1 changed file with 109 additions and 0 deletions.
109 changes: 109 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<title>Nested Dropdown Menu</title>
<style>
/* Style the dropdown menu */
.dropdown {
position: relative;
display: inline-block;
}

/* Style the dropdown menu items */
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
z-index: 1;
}

/* Style the dropdown menu links */
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}

/* Style the dropdown menu links on hover */
.dropdown-content a:hover {
background-color: #f1f1f1;
}

/* Show the dropdown menu when hovering over the dropdown */
.dropdown:hover .dropdown-content {
display: block;
}

/* Style the nested dropdown menu */
.nested-dropdown {
position: relative;
}

/* Style the nested dropdown menu items */
.nested-dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
left: 100%;
top: 0;
z-index: 1;
}

/* Show the nested dropdown menu when hovering over the parent item */
.nested-dropdown:hover
.nested-dropdown-content {
display: block;
}
</style>
</head>

<body>
<div class="dropdown">
<button class="dropbtn">
Menu 1
</button>
<div class="dropdown-content">
<div class="nested-dropdown">
<a href="#">Submenu 1</a>
<div
class="nested-dropdown-content"
>
<a href="#"
>Submenu 1.1</a
>
<a href="#"
>Submenu 1.2</a
>
<a href="#"
>Submenu 1.3</a
>
</div>
</div>
<div class="nested-dropdown">
<a href="#">Submenu 2</a>
<div
class="nested-dropdown-content"
>
<a href="#"
>Submenu 2.1</a
>
<a href="#"
>Submenu 2.2</a
>
<a href="#"
>Submenu 2.3</a
>
</div>
</div>
</div>
</div>
</body>
</html>

0 comments on commit 91e6a59

Please sign in to comment.