Create a menu in HTML/CSS showing up horizontally - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu

Description

Create a menu in HTML/CSS showing up horizontally

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">
ul {<!--from   w  w w . j a v  a  2 s .  com-->
   list-style-type:none;
   margin:0;
   padding:0;
   overflow:hidden;
}

li {
   float:center;
}

a:link, a visited {
   font-family:arial;
   display:block;
   width:121px;
   color:Chartreuse;
   text-align:center;
}

ul li {
   background:yellow;
   display:inline-block;
}

a {
   text-decoration:none;
}

a:hover, a:active {
   background-color:blue;
   color:pink;
}
</style> 
 </head> 
 <body> 
  <div id="header"> 
   <h1>Lorem ipsum</h1> 
  </div> 
  <ul> 
   <li> <a href="#HomePage">Lore</a> </li> 
   <li> <a href="#AboutMe">Lorem ip</a> </li> 
   <li> <a href="#Coding">Lorem </a> </li> 
   <li> <a href="#Contacts">Lorem ip</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials