Dropdown layout for last item - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Layout

Description

Dropdown layout for last item

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">
.menuBox {<!--from   w  w w .  j a  v  a2  s.  com-->
   position:absolute;
   top:75px;
   right:3px;
}

.menuBox ul {
   list-style:none;
}

.menuBox li {
   float:left;
   margin-left:18px;
   font-size:15px;
   text-transform:uppercase;
}

.menuBox li a {
   color:Chartreuse;
   text-decoration:none;
   display:block;
   padding-bottom:15px;
}

.menuBox li a:hover {
   background:url('https://www.java2s.com/style/demo/Google-Chrome.png') repeat-x 0 bottom;
}

.menuBox ul li ul {
   display:none;
}

.menuBox ul li:hover ul {
   display:block;
}

.menuBox ul li ul li {
   display:block;
   float:none;
}
</style> 
 </head> 
 <body> 
  <nav class="menuBox"> 
   <ul> 
    <li> <a href="index.html">Lore</a> </li> 
    <li> <a href="">Lorem ipsum </a> </li> 
    <li> <a href="#">Lorem ip</a> </li> 
    <li> <a href="">Lorem </a> </li> 
    <li> <a href="">Lorem</a> </li> 
    <li> <a href="#">Lorem</a> </li> 
    <li> <a href="">Lorem ip</a> 
     <ul> 
      <li class="first"> <a href="">Lorem</a> </li> 
      <li> <a href="/app_dev.php/user/edit">Lorem ipsum </a> </li> 
      <li class="last"> <a href="">Lorem i</a> </li> 
     </ul> </li> 
   </ul> 
  </nav>  
 </body>
</html>

Related Tutorials