Use <UL> to make horizontal navigation menu with one item selected - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Item

Description

Use <UL> to make horizontal navigation menu with one item selected

Demo Code

ResultView the demo in separate window

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head> 
  <title>Centering absolutely positioned div based on parent's</title> 
  <style type="text/css">
#menu-nav {<!--  w w  w  .j a  v  a2  s.co m-->
   list-style:none;
}

#menu-nav {
   float:right;
   clear:right;
   margin-top:31px;
   font-family:'Arvo'
}

#menu-nav li {
   list-style:none;
   margin:0 11px;
   float:left;
}

#menu-nav a {
   color:Chartreuse;
   padding:7px 10px;
   font-size:18px;
   background:yellow;
   text-decoration:none;
}

#menu-nav li.current-menu-item a {
   background:blue;
   color:pink;
}

#menu-nav li.current-menu-item {
   background:url('http://www.java2s.com/style/demo/Google-Chrome.png') no-repeat CENTER BOTTOM;
   padding-bottom:12px;
}
</style> 
 </head> 
 <body> 
  <ul id="menu-nav"> 
   <li> <a href="#">Home</a> </li> 
   <li> <a href="#">Artistse</a> </li> 
   <li> <a href="#">About</a> </li> 
   <li class="current-menu-item"> <a href="#">News</a> </li> 
   <li> <a href="#">Store</a> </li> 
   <li> <a href="#">Contact</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials