Good Day.
I have an element that has two three classes assigned to it. Two are assigned in the html, and one is assigned by jQuery as an active class.
Now I want to specify, in CSS, a hover effect but to the one specific element: The "menuItem first" class...
HTML:
<ul>
<li class="menuItem first"><a href=""><img src="img/sample_slides/1.png" alt="thumbnail" /></a></li>
<li class="menuItem"><a href=""><img src="img/sample_slides/1.png" alt="thumbnail" /></a></li>
<li class="menuItem"><a href=""><img src="img/sample_slides/1.png" alt="thumbnail" /></a></li>
<li class="menuItem"><a href=""><img src="img/sample_slides/1.png" alt="thumbnail" /></a></li>
</ul>
CSS:
li.act,li.act:hover{
/* The active state of the thumb */
background:url(img/active_bg2.png) no-repeat;
}
li.act .first, li.act .first:hover{
/* The active state of the thumb - first class only! */
background:url(img/active_bg1.png) no-repeat;
}
I know the css right above is wrong. What is the right annotation?
Remember that the .act class is assigned by jQuery to the active element...
.actand.first...li.act,li.act:hoveris equivalent toli.act