Extra padding under menu with child - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

Extra padding under menu with child

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">
.css_menu_two_line {
   width:100%;
   overflow:hidden;
}

.two_line_menu {<!--from   w w w  .j a v  a2 s . co m-->
   padding-left:0;
   position:relative;
   margin-bottom:41px;
   background:Chartreuse url('https://www.java2s.com/style/demo/Google-Chrome.png') repeat-x;
}

.two_line_menu a {
   display:block;
   color:yellow;
   text-decoration:none;
   padding:11px;
}

.two_line_menu li:hover a {
   color:blue;
   background:pink;
}

.current a {
   color:OrangeRed;
   background:grey;
}

.two_line_menu li {
   display:inline-block;
}

.two_line_menu li ul {
   display:block;
   position:absolute;
   left:0;
   width:100%;
   background:BlueViolet;
   top:39px;
   padding:0;
}

.two_line_menu li:hover ul {
   display:block;
   position:absolute;
   left:0;
   width:100%;
   background:Chartreuse;
   top:39px;
}

.two_line_menu li ul li:hover a {
   color:yellow;
}
</style> 
 </head> 
 <body> 
  <div class="css_menu_two_line"> 
   <ul class="two_line_menu"> 
    <li> <a href="#">Lorem </a> </li> 
    <li> <a href="#">Lorem </a> </li> 
    <li class="current"> <a href="#">Lorem ipsum</a> 
     <ul> 
      <li> <a href="#">Lorem ipsum</a> </li> 
      <li> <a href="#">Lorem ipsum</a> </li> 
      <li> <a href="#">Lorem ipsum</a> </li> 
      <li> <a href="#">Lorem ipsum</a> </li> 
      <li> <a href="#">Lorem ipsum</a> </li> 
     </ul> </li> 
    <li> <a href="#">Lorem </a> </li> 
    <li> <a href="#">Lorem </a> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials