Three level Navigation drop down - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Dropdown

Description

Three level Navigation drop down

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.nav {<!--from   w  w  w.  jav a2  s . c o  m-->
   width:100%;
   background:Chartreuse;
   padding:0;
   margin:0;
   position:relative;
}

.nav ul {
   background:yellow;
   list-style:none;
   padding:0 21px;
   margin:0;
}

ul.test li {
   display:inline-block;
}

.nav ul li a {
   color:blue;
   display:block;
   padding:0px 41px;
   text-decoration:none;
   float:left;
   height:61px;
   line-height:61px;
}

.nav ul li:hover {
   background:pink;
}

.nav ul li:hover>a {
   color:OrangeRed;
}

.nav ul li:hover>ul {
   display:block;
}

.nav ul ul {
   background:grey;
   padding:0;
   display:none;
   width:100%;
   position:absolute;
   top:61px;
   left:0px;
}

.nav ul ul ul {
   background:BlueViolet;
   display:none;
   width:201px;
   position:absolute;
   top:61px;
   left:0px;
}

.nav ul ul ul:nth-child(2) {
   left:201px;
}

.nav ul>li>ul>li>ul>li {
   background-color:Chartreuse;
   padding-top:;
   width:34.33334%;
}

div>h4 {
   color:yellow;
   padding-left:39px;
}

ul.thrdLvl>li {
   display:block;
   max-width:100px;
}

@media screen and (max-width: 480px)  {
   .nav {
      width:100%;
      float:none;
      padding:0 3em;
   }
   
   .nav ul {
      width:100%;
   }
   
   .nav ul li {
      width:100%;
   }

}
</style> 
 </head> 
 <body> 
  <!--       <div class="container">
         <header class="clearfix">
            <span>Blueprint</span>
            <h1>Horizontal Drop-Down Menu</h1>
         </header>    --> 
  <div class="nav"> 
   <ul class="nav-primary test"> 
    <li> <a href="#">Lorem ips</a> 
     <ul class="test"> 
      <li> <a href="#">Lorem ipsum</a> </li> 
      <li> <a href="#">Lorem i</a> </li> 
      <li> <a href="#">Lorem ipsum</a> 
       <ul class="thrdLvl"> 
        <li> <h4>Lorem i</h4> </li> 
        <li> <a href="#">Lore</a> </li> 
        <li> <a href="#">Lore</a> </li> 
        <li> <a href="#">Lore</a> </li> 
       </ul> 
       <ul class="thrdLvl"> 
        <li> <h4>Lorem i</h4> </li> 
        <li> <a href="#">Lore</a> </li> 
        <li> <a href="#">Lore</a> </li> 
        <li> <a href="#">Lore</a> </li> 
       </ul> </li> 
     </ul> </li> 
    <li> <a href="#">Lorem ip</a> 
     <ul> 
      <li> <a href="#">Lorem ipsu</a> </li> 
      <li> <a href="#">Lorem ipsum dol</a> </li> 
     </ul> </li> 
    <li> <a href="#">Lorem ipsum </a> </li> 
    <li> <a href="#">Lorem ip</a> </li> 
    <li> <a href="#">Lorem ipsu</a> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials