Last active
March 2, 2022 13:43
-
-
Save AnonyFriday/8f70e608c81f8ef92c4778ab5a6e8a8f to your computer and use it in GitHub Desktop.
CSS Multi-level Menu
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="./css/index.css"> | |
</head> | |
<body> | |
<header> | |
<nav> | |
<h1>Multi Level Menu</h1> | |
<ul class="menu"> | |
<li><a href="">Menu</a></li> | |
<li><a href="">About Us</a></li> | |
<li><a href="">Content</a></li> | |
<li> | |
<a href="">Computers</a> | |
<ul class="menu--sub-1"> | |
<li><a href="">Contact 1</a></li> | |
<li><a href="">Contact 2</a></li> | |
<li><a href="">Contact 3</a></li> | |
<li><a href="">Contact 4</a></li> | |
<li><a href="">Contact 5</a> | |
<ul class="menu--sub-2"> | |
<li><a href="">Contact 1</a></li> | |
<li><a href="">Contact 2</a></li> | |
<li><a href="">Contact 3</a></li> | |
<li><a href="">Contact 4</a></li> | |
<li><a href="">Contact 5</a></li> | |
</ul> | |
</li> | |
</ul> | |
</li> | |
<li> | |
<a href="">Contact</a> | |
<ul class="menu--sub-1"> | |
<li><a href="">Contact 1</a></li> | |
<li><a href="">Contact 2</a></li> | |
<li><a href="">Contact 3</a></li> | |
<li><a href="">Contact 4</a></li> | |
<li> | |
<a href="">Contact 5</a> | |
<ul class="menu--sub-2"> | |
<li><a href="">Contact 1</a></li> | |
<li><a href="">Contact 2</a></li> | |
<li><a href="">Contact 3</a></li> | |
<li><a href="">Contact 4</a></li> | |
<li><a href="">Contact 5</a></li> | |
</ul> | |
</li> | |
</ul> | |
</li> | |
</ul> | |
</nav> | |
</header> | |
</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
*, | |
*::after, | |
*::before { | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} | |
html, | |
body { | |
height: 100vh; | |
} | |
a { | |
text-decoration: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment