Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# jQuery
Please help
If i click anchor tag then this page is active and background colour changed.
 
<ul>
    <li><a href="index.php">HOME</a></li>
    <li><a href="two.php">PORTFOLIO</a></li>
    <li><a href="three.php">ABOUT</a></li>
    <li><a href="four.php">CONTACT</a></li>
    <li><a href="five.php">SHOP</a></li>
</ul>
Posted 28-Dec-12 19:12pm
Comments
ssyuvaraja at 29-Dec-12 4:36am
   
I did not understand the question. Is this like, If you click the "Shop" anchor tag, the color of the "Shop" anchor tag need to be changed? or please tell the problem clearly.
Ashish Rathod at 29-Dec-12 6:09am
   
If i click HOME then this tag is active and color is changed but when i click next tag like SHOP then this tag is active not HOME tag is active so SHOP tag color changed not HOME.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You try this CSS style: I hope you asking for this only.
 
//normal link
ul li a
{
 color:#FFF;
}
 
//while mouse hover
ul li a:hover
{
 color:#FFF;
 
}
 
//hold the link
ul li a:active
{
 color:#FC0;
}
 
//after clicked
ul li a:visited
{
 color:#ff0;
}
  Permalink  
Comments
Ashish Rathod at 29-Dec-12 5:43am
   
If i click HOME then this tag is active and color is changed but when i click next tag like SHOP then this tag is active not HOME tag is active so SHOP tag color changed not HOME.
ssyuvaraja at 29-Dec-12 7:12am
   
Please try the order as "normal link,Visited,Mouse hover, Active" order. If this is not worked means, Then have to use Jquery/JS. Please clear browser history after change code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 29 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid