<div id="nav">
<ul id="rightMin">
<li id="selectedmenu" onclick="location.href='index.php'">main</li>
<li onclick="location.href='aboutus.php'">about</li>
<li><a href="#">contact us</a></li>
</ul>
</div>
CSS:
#selectedmenu {
display:inline;
float:right;
/*padding: 2px 7px 0px 7px;*/
height: 35px;
background: url('../images/selected.png') repeat-x;
cursor: pointer;
text-align: center;
line-height:35px;
padding: 0 5px 0 5px;
color: white;
}
div#nav ul li {
display:inline;
float:right;
/*padding: 2px 7px 0px 7px;*/
height: 35px;
cursor: pointer;
text-align: center;
line-height:35px;
padding: 0 5px 0 5px;
}
div#nav ul li:hover {
background: #232323;
color:#fff;
}
The element with the ID selectedmenu
takes CSS #selectedmenu
but when hovering it takes div#nav ul li:hover
. how can i make it sticks with #selectedmenu