-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
127 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,109 +1,13 @@ | ||
<!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; | ||
} | ||
<html> | ||
<head> | ||
<title>index.html</title> | ||
</head> | ||
<body> | ||
|
||
/* Style the dropdown menu items */ | ||
.dropdown-content { | ||
display: none; | ||
position: absolute; | ||
background-color: #f9f9f9; | ||
min-width: 160px; | ||
z-index: 1; | ||
} | ||
<iframe src="menu.html" width="100%" name="menu" target="main" style="height: 50px; w> | ||
<br> | ||
<iframe src="main.html" width="100%" name="main" style="position: absolute; height: 94%; widt> | ||
/* 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="sub1_1.html" | ||
>Submenu 1.1</a | ||
> | ||
<a href="sub1_2.html" | ||
>Submenu 1.2</a | ||
> | ||
<a href="sub1_3.html" | ||
>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> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
|
||
<h1>Main</h1> | ||
<p>Main HTML Page</p> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>Menu Page</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="sub1_1.html" | ||
>Submenu 1.1</a | ||
> | ||
<a href="sub1_2.html" | ||
>Submenu 1.2</a | ||
> | ||
<a href="sub1_3.html" | ||
>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> |