I have a class on the li
called current-page
. I want this class to move to every li
and remove from the previous one when visited.
<div class="nav-collapse collapse">
<ul class="nav pull-right">
<li class="current-page">
<a href="/">Home</a>
</li>
<li>
<a href="/Pages/StaticPage?pagePath=About%20Us">About Us</a>
</li>
<li>
<a href="/Pages/StaticPage?pagePath=Investors">Investors</a>
</li>
<li>
<a href="/Pages/ContantPage?pageId=1">Products</a>
</li>
<li>
<a href="/Pages/ContantPage?pageId=2">Services</a>
</li>
<li>
<a href="/Pages/ContantPage?pageId=3">Quality & HSE</a>
</li>
<li>
<a href="/Pages/PhotoGallery">Photo Gallery</a>
</li>
<li>
<a href="/News/News">News</a>
</li>
<li>
<a href="/Pages/StaticPage?pagePath=Contact%20Us">Contact Us</a>
</li>
</ul>
</div>
i try css not work too
.header ul.nav li a:active
{
background-color: #EEEEEE !important;
text-decoration: none !important;
}
and this too not work
.header ul.nav li a:visited
{
background-color: #EEEEEE !important;
text-decoration: none !important;
}