mercredi 5 août 2015

HTML li class=youarehere not working


am doing a HTML website, and I have a main menu - Home, About etc.
I have several html pages and for each page I want the menu li to change color to #E38400.

Here is my code:

<div id="nav">
    <ul>
        <li class="youarehere"><a href="#"><h3>menuITEM</h3></a></li>
        <li><a href="#"><h3>menuITEM</h3></a></li>
        <li><a href="#"><h3>menuITEM</h3></a></li>
        <li><a href="#"><h3>menuITEM</h3></a></li>
        <li><a href="#"><h3>menuITEM</h3></a></li>
    </ul>
</div>

and my style.css code:

.header #nav ul li .youarehere {
    background:#E38400; border-radius:5px; color:#FFF;
    }

but the first list item still shows the same color etc. I want to use neither jQuery nor any other script, but why is this not working?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire