• Article Written 
  • on 10.06.2009
  •  at 09:48 AM
  •  by admin

Tutorial to create a Beautiful, simple, horizontal CSS menu

This is a very simple, horizontal css menu .This tutorial helps to create a simple and attractive CSS menu with a cool hover effect.

First of all let us write CSS code for menu. here goes the code..

#nav
{
    padding:0;
}
#nav li
{
    display:inline;
}
#nav li a
{  
   font-family:Arial;
   font-size:12px;
   text-decoration: none;
   float:left;
   padding:10px;
   background-color: #333333;
   color:#ffffff;
   border-bottom:1px;
   border-bottom-color:#000000;
   border-bottom-style:solid;
}
#nav li a:hover
{
   background-color:#9B1C26;
   padding-bottom:12px;
   border-bottom:2px;
   border-bottom-color:#000000;
   border-bottom-style:solid;
   margin:-1px;
}

Second of all let us write HTML list for menu. Say we have 7 links, as shown in image, here goes the code..

<ul id="nav">     <li><a href="#">Home</a></li>     <li><a href="#">About</a></li>     <li><a href="#">Services</a></li>     <li><a href="#">Products</a></li>     <li><a href="#">Sitemap</a></li>     <li><a href="#">Help</a></li>     <li><a href="#">Contact Us</a></li> </ul>

Yeah..! its done! see how simple is to create a CSS menu… A demo..?

Check out the demo below..


Promote Us

  • Add to Mixx!
Ace Hosting India

Tags: ,

Untitled Document

3 Comments

  1. ohhh, thanks for sharing this tutorial :)

  2. Uh oh. There seems to be a bug. (at least in Opera). If you mouseover the bar, and move the mouse horizontally, the background change doens’t occur on the other sections, only if you move the mouse out of the bar and over it again.

    Maybe this is just a bug with opera.

  3. It works fine in my version of Opera (10.10)
    Andy Walpole´s last blog ..The internet 10 years ago this month – January 2000 My ComLuv Profile

Submit a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


CommentLuv Enabled