This is really bugging me. Due to the CMS, I have a list with li's like this:
<li class="leaf first active-trail">
<a href="/trash-this" id="specialIDTest" class="first active" title="">specialTest</a>
</li>
I'm trying to style the menu item, the "li
", NOT the "a
"... the existing applied css adds padding/coloring etc to the li element, not the a psuedo tag so I need to affect the li
for a current state.
So, I need to select: "Whatever is the current li with the class of active-trail but only if it has a child link with the id of 'specialIDTest'.
The reason being that depending what area a user is on, the specific 'specialIDTest' will be color coordinated so I cannot apply a general style declaration to 'active-trail' as that would make all the sections (menu items) the same color when the active area.
So I'm not seeing a 'right to left' selection process here. As I cannot add a class or id to the actual 'li' element, I'm somewhat stuck.
I may be making this harder than need be. I have to support IE7 and above and would rather do this will CSS instead of adding more JQuery, but will do so if necessary.