CSS Navigation menu bar Gap - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Bar

Description

CSS Navigation menu bar Gap

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 ul {<!--from w  w w  .  j  a  v  a  2s .c o  m-->
   margin:0;
   padding:0;
   list-style:none;
   overflow:hidden;
   border:2px solid Chartreuse;
   background-color:yellow;
}

#nav li {
   float:left;
}

#nav li a {
   display:block;
   color:blue;
   text-align:center;
   padding:15px 17px;
   text-decoration:none;
   font-family:'Economica', sans-serif;
}

#nav li a:hover:not(.active) {
   background-color:pink;
}

#nav li a.active {
   color:OrangeRed;
   background-color:grey;
}

#nav li:last-child {
   float:right
}
</style> 
 </head> 
 <body> 
  <div id="nav"> 
   <ul> 
    <li> <a href="#">Lorem ipsum dol</a> </li> 
    <li> <a href="#">Lorem ipsum dolor </a> </li> 
    <li> <a href="#">Lorem ipsum dol</a> </li> 
    <li> <a href="#">Lorem </a> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials