How To Create Multilevel Dropdown Menu Using HTML/CSS
Submitted by alpha_luna on Wednesday, April 20, 2016 - 15:51.
In the previous tutorial, we create Mega Menu using the script. In this article, we are going to learn on How To Create Multilevel Dropdown Menu Using HTML/CSS without script. This source code is very simple and easy, and it's a pure CSS and HTML only.
Multilevel Menu - HTML
This HTML source code is used for displaying menu in multilevel.
Multilevel Menu - CSS
And, this is our style.
Share us your thoughts and comments below. Thank you so much for dropping by and reading this tutorial post. For more updates, don’t hesitate and feel free to visit this website more often and please share this with your friends or email me at [email protected]. Practice Coding. Thank you very much.
- <style type="text/css">
- #menu {
- width:400px;
- margin:auto;
- }
- .first_Menu {
- display: block;
- position: relative;
- float: left;
- line-height: 30px;
- background-color: blue;
- border-right:blue 1px solid;
- }
- .first_Menu a {
- margin: 10px;
- color: #FFFFFF;
- font-size:20px;
- text-decoration: none;
- }
- .first_Menu:hover > ul {
- display:block;
- position:absolute;
- }
- .sub_Menu {
- display: none;
- }
- .sub_Menu li {
- background-color: azure;
- line-height: 30px;
- border-bottom:#CCC 1px solid;
- border-right:#CCC 1px solid;
- width:100%;
- }
- .sub_Menu li a {
- color: #000000;
- }
- ul {
- list-style: none;
- margin: 0;
- padding: 0px;
- min-width:10em;
- }
- ul ul ul {
- left: 100%;
- top: 0;
- margin-left:1px;
- }
- li:hover {
- background-color: red;
- }
- .first_Menu li:hover {
- background-color: #d0d0d0;
- }
- .expand {
- font-size:12px;
- float:right;
- margin-right:5px;
- }
- </style>
Add new comment
- 954 views