extend Navigation in CSS - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Nav Bar

Description

extend Navigation in CSS

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">
body {<!--  ww w .  j  a  va 2s .c  o  m-->
   background:SILVER;
   margin:0;
   padding:0 auto;
}

.banner {
   background:blue;
   width:1001px;
   height:71px;
}

.logo {
   margin-top:11px;
   margin-right:501px;
}

#navMenu {
   margin:0;
   padding:0;
   line-height:31px;
   width:1001px;
}

#navMenu ul {
   margin:0;
   padding:0;
   border:2px white;
}

#navMenu li:hover {
   font-weight:normal;
   text-transform:capitalize;
   background:silver;
}

#navMenu ul li {
   margin:0;
   padding:0;
   list-style:none;
   float:left;
   position:relative;
   background:Chartreuse;
   border:2px white;
   border-left:2px solid yellow;
   border-right:2px solid blue;
   width:166.7px;
}

#navMenu ul: hover {
   text-transform:capitalize;
}

#navMenu ul li a {
   text-align:center;
   font-family:"Arial";
   text-decoration:none;
   height:31px;
   width:151px;
   display:block;
   color:pink;
}

#navMenu ul ul {
   position:absolute;
   visibility:hidden;
   top:31px;
   border:2px white;
}

#navMenu ul li:hover ul {
   visibility:visible;
}
</style> 
 </head> 
 <body bgcolor="#FFCECE"> 
  <center> 
   <div class="banner"> 
    <img src="https://www.java2s.com/style/demo/Opera.png" class="logo" WIDTH="100" HEIGHT="100" ALT="pZ"> 
   </div> 
   <div id="wrapper"> 
    <div id="navMenu"> 
     <ul> 
      <li> <a href="#">Lorem ips</a> 
       <ul> 
        <li> <a href="#">Lorem</a> </li> 
        <li> <a href="#">Lorem i</a> </li> 
        <li> <a href="#">Lorem</a> </li> 
       </ul> 
       <!-- end of Second List --> </li> 
      <li> <a href="#">Lorem ips</a> </li> 
      <li> <a href="#">Lorem ipsum dolor si</a> </li> 
      <li> <a href="#">Lorem ipsum dolor si</a> </li> 
      <li> <a href="#">Lorem ipsu</a> </li> 
      <li> <a href="#">Lorem ipsum </a> 
       <ul> 
        <li> <a href="#">Lorem</a> </li> 
        <li> <a href="#">Lorem </a> </li> 
        <li> <a href="#">Lore</a> </li> 
       </ul> 
       <!-- end of Second List --> </li> 
      <!-- end of List Item --> 
     </ul> 
     <!-- end of Unordered List --> 
    </div> 
    <!-- end of navMenu div --> 
   </div> 
   <!-- end of wrapper div--> 
  </center>  
 </body>
</html>

Related Tutorials