Dropdown menu with border - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Dropdown

Description

Dropdown menu with border

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">
ul#nav {<!--from w  w w  .ja  va  2 s . c  om-->
   margin:-3px;
}

ul.drop a {
   display:block;
   color:Chartreuse;
   font-family:Verdana;
   font-size:15px;
   text-decoration:none;
}

ul.drop, ul.drop li, ul.drop ul {
   list-style:none;
   margin:0;
   padding:0;
   border:2px solid yellow;
   background:blue;
   color:pink;
}

ul.drop {
   position:relative;
   z-index:598;
   float:left;
}

ul.drop li {
   float:left;
   line-height:2.4em;
   vertical-align:middle;
   zoom:2;
   padding:6px 11px;
}

ul.drop li.hover, ul.drop li:hover {
   position:relative;
   z-index:600;
   cursor:default;
   background:OrangeRed;
   color:grey;
}

ul.drop ul {
   visibility:hidden;
   position:absolute;
   top:100%;
   left:0;
   z-index:599;
   width:196px;
   background:BlueViolet;
}

ul.drop ul li {
   float:none;
}

ul.drop ul ul {
   top:-3px;
   left:100%;
}

ul.drop li:hover>ul {
   visibility:visible
}

ul.drop li a:hover {
   background:Chartreuse;
   color:yellow;
}

ul.drop li:hover>a {
   background:blue;
   color:pink;
}

li#main {
   padding:0px;
   border:0px;
   display:block;
   background:transparent;
   border-color:OrangeRed;
   color:grey;
}

img {
   display:block;
}
</style> 
 </head> 
 <body> 
  <ul id="nav" class="drop"> 
   <!-- Boton de Inicio--> 
   <li id="main"> <img src="https://www.java2s.com/style/demo/Opera.png" border="0" height="50px" width="66px" style="top:3px; z-index:1;"> 
    <ul> 
     <li> <a id="drop1" href="mensaje_content.html" target="_self">Lorem ipsum dolor sit </a> </li> 
     <li> <a id="drop1" href="pasos_en_verde.html" target="_self">Lorem ipsum dolo</a> </li> 
     <li> <a id="drop1" href="perfil_Org.html" target="_self">Lorem ipsum dolor sit ame</a> </li> 
     <li id="seleccionada"> <font color="#5AAF92">Lorem ipsum dolor si</font> </li> 
     <li> <a id="drop1" href="BaBF.html" target="_self">Lorem ipsum dolor sit ame</a> </li> 
     <li> <a id="drop1">Lorem ipsum dolor sit</a> </li> 
    </ul> </li> 
  </ul>  
 </body>
</html>

Related Tutorials