Center navigation bar menu - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Nav bar alignment

Description

Center navigation bar menu

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 {<!-- w w  w. ja  v a 2 s  .co  m-->
   margin:0;
   padding-top:21px;
}

#menu {
   margin:0;
   padding:0;
   list-style:none;
   text-align:center;
}

#menu li {
   display:inline-block;
   border:3px solid Chartreuse;
   margin-right:21px;
}

#menu li a {
   padding:0 11px;
   font-size:13px;
   color:yellow;
   text-decoration:none;
}

#menu li a:hover {
   color:blue;
}
</style> 
 </head> 
 <body> 
  <ul id="menu"> 
   <li> <a href="#">Lorem ips</a> </li> 
   <li> <a href="#">Lorem ipsu</a> </li> 
   <li> <a href="#">Lorem ips</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials