Click here to Skip to main content
16,017,376 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here i will give css code pls add the submenu

CSS
#cssmenu {
  margin : 0px 0px 0px 0px;
  padding: 0;
  list-style-type: none;
  width: auto;
  position: relative;
  display: block;
  height: 36px;
  font-size: 12px;
  font-weight: bold;

  background: transparent url('/Images/bg.jpg') repeat-x top left;
  font-family: 'Trebuchet MS', Helvetica, Arial, Verdana, sans-serif;
  border-bottom: 1px solid #000000;
  border-top: 1px solid #000000;
  border: 1px solid #ccc;
  background-color:Black;
}
#cssmenu li {
  display: block;
  float: left;
  margin: 0;
  padding: 0;
}
#cssmenu li a {
  display: block;
  float: left;
  color: #999999;
  text-decoration: none;
  font-weight: bold;
  padding: 12px 20px 0 20px;
  height: 24px;
}
#cssmenu li a:hover {
  color:Silver;
  background: transparent url('/Images/over.jpg') no-repeat top right;
}
Posted

Hey there,

Check this simple example:

http://css-tricks.com/targetting-menu-elements-submenus-navigation-bar/[^]

Take a thorough look.

Good luck

Azee...
 
Share this answer
 
 
Share this answer
 
 
Share this answer
 
use this code it's really helping to you.............:-)

XML
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
ul li
{
    padding:0 8px;
    background-color:#333333;
    display:inline;
    width:80px;
    float:left;
    color:#FFFFFF;
    text-align:center;
    border:#0099CC solid 2px;
}

ul li:hover
{
    background-color:#00CC00;

}

ul li a
{
    text-decoration:none;
    color:#FFFFFF;
}

ul li:hover ul
{
    float:right;
    right:2px;
}

ul li ul li
{
    display:none;
    background-color:#00CC00;
    text-align:left;
}

ul li:hover ul li
{
    display:inline;
    width:60px;
}

ul li ul li a:hover
{
    color:#666666;
}

</style>
</head>

<body>
<div>
    <ul>
        <li><a>Home</a></li>
        <li><a>About Us</a></li>
        <li>
            <a>Services</a>
            <ul>
                <li><a>Service 1</a></li>
                <li><a>Service 2</a></li>
                <li><a>Service 3</a></li>
            </ul>
        </li>
        <li><a>Contact Us</a></li>
    </ul>
</div>
</body>
</html>


Thanx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900