Aligning a ul to the middle to make horizontal CSS menus - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

Aligning a ul to the middle to make horizontal CSS menus

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">
#menu<!--from  w  ww .j a  v a2  s  .c o  m-->
 {
   width:831px;
   margin:0 auto;
   display:inline;
}

#menu ul {
   text-align:center;
}

#menu li {
   display:inline-block;
}
</style> 
 </head> 
 <body> 
  <div id="menu"> 
   <ul> 
    <li> <a href="">HOME</a> </li> 
    <li> <a href="">SHOP</a> </li> 
    <li> <a href="">Contacts</a> </li> 
    <li> <a href="">About us</a> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials