mucea
12-11-2006, 11:35 PM
hello. i am trying to make an horizontal css menu that has 5 intems, and each item has to have a specific image. but all that i have done so har is managed to put an image...that is shown on all of them.
do you have any idea how to do this?
// html code
<div id="navcontainer">
<ul>
<li><a href="#" >item 1</a></li>
<li><a href="#" >item2</a></li>
<li><a href="#" >item3</a></li>
<li><a href="#">item4</a></li>
<li><a href="#" >item5</a></li>
</ul>
</div>
//...
//css code
#navcontainer { margin-left: 0px; }
#navcontainer ul
{
margin: 0;
padding: 0;
list-style-type: none;
font-family: verdana, arial, Helvetica, sans-serif;
}
#navcontainer li {
margin: 0;
background-repeat: no-repeat;
}
#navcontainer a
{
display: block;
padding: 1px 0px;
width: 180px;
height:40px;
color: #fff;
text-align: center;
text-decoration: none;
border-top: 1px solid #fff;
border-left: 1px solid #fff;
border-bottom: 1px solid #333;
border-right: 1px solid #333;
font-weight: normal;
font-size: 13px;
background-image: url(images/vertical2.jpg) ;
background-repeat: no-repeat;
background-position: 0 0;
}
#navcontainer a:hover
{
color: #000;
background-color: #00CCFF;
text-decoration: none;
border-top: 1px solid #333;
border-left: 1px solid #333;
border-bottom: 1px solid #fff;
border-right: 1px solid #fff;
background-image: url(images/vertical1.jpg);
background-repeat: no-repeat;
background-position: right;
}
//.....
thank you!
do you have any idea how to do this?
// html code
<div id="navcontainer">
<ul>
<li><a href="#" >item 1</a></li>
<li><a href="#" >item2</a></li>
<li><a href="#" >item3</a></li>
<li><a href="#">item4</a></li>
<li><a href="#" >item5</a></li>
</ul>
</div>
//...
//css code
#navcontainer { margin-left: 0px; }
#navcontainer ul
{
margin: 0;
padding: 0;
list-style-type: none;
font-family: verdana, arial, Helvetica, sans-serif;
}
#navcontainer li {
margin: 0;
background-repeat: no-repeat;
}
#navcontainer a
{
display: block;
padding: 1px 0px;
width: 180px;
height:40px;
color: #fff;
text-align: center;
text-decoration: none;
border-top: 1px solid #fff;
border-left: 1px solid #fff;
border-bottom: 1px solid #333;
border-right: 1px solid #333;
font-weight: normal;
font-size: 13px;
background-image: url(images/vertical2.jpg) ;
background-repeat: no-repeat;
background-position: 0 0;
}
#navcontainer a:hover
{
color: #000;
background-color: #00CCFF;
text-decoration: none;
border-top: 1px solid #333;
border-left: 1px solid #333;
border-bottom: 1px solid #fff;
border-right: 1px solid #fff;
background-image: url(images/vertical1.jpg);
background-repeat: no-repeat;
background-position: right;
}
//.....
thank you!