I have menu like that
<ul id="menu">
<li>
<a href="/">Home</a>
</li>
<li class="menu-selected">
<a href="/Results">Results</a>
</li>
</ul>
I want to make menu item selected after it was clicked. I set li
class "menu-selected"
But no luck.
.menu-selected ul#menu li a //also i was trying to sa开发者_运维百科y a:link but no luck
{
background-color: #91c05e !important;
text-decoration: none !important;
color: #fff !important;
}
Any ideas?
ul#menu li.menu-selected a
is what you want to do
I'm pretty sure you want
ul li.menu-selected a
instead, since that applies to all links inside <li>
elements with class menu-selected
.
do:
ul#menu li.menu-selected a
From left to right it's parent -> child element
You probably only need .menu-selected a
精彩评论