CSS styling A href inside
  • csscss-selectors

    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 say a:link but no luck
     {
        background-color: #91c05e !important;
        text-decoration: none !important;
        color: #fff !important;
    }
    

    Any ideas?

    Best Solution

    ul#menu li.menu-selected a
    

    is what you want to do