I want to have 3 states:
normal
hover - when you mose over an <li> item
over - <li> item is highlited when you’re in that particular document (page)
normal and hover are working great, but I’m having troble with over state
For instance: When I’m in section "home" I want "home" highlighted differently so I made .over class for it
css:
#nav{
text-align:center;
font-size:12px;
padding-left:15px;
font-weight:bold;
margin:0 auto;
background:url(../images/nav_bg.jpg);
width:925px; height:49px;}
#nav ul{
list-style: none;}
#nav ul li{
display: inline;}
#nav ul li a{
float: left;
display: block;
padding: 18px 15px 0 15px;
height: 31px;
text-align: center;
text-decoration: none;
color: #ffffff;}
#nav ul li a:hover{
text-decoration:none;
background: url(../images/nav_bg_hover.jpg) repeat-x;
color:#87fe77;}
#nav ul li a.over{
text-decoration:none;
background: url(../images/nav_bg_hover.jpg) repeat-x;
color:#87fe77;}
It’s working in static html:
I jaust added .over to <li> like this:
<li><a href="about.html">About</a></li>
<li class="over"><a href="home.html">Home</a></>