Posted By

ascendinglines on 01/19/08


Tagged


Versions (?)

Link classes


 / Published in: CSS
 

URL: http://rainbow.arch.scriptmania.com/css/css_classes.html

  1. a.menu:active {color:blue}
  2. a.menu:visited {color:blue}
  3. a.menu:link {color:blue}
  4. a.menu:hover {color:pink}
  5.  
  6. Then add class="menu" to the links you'd like different, like this:
  7. <a href="page.html" class="menu">link</a>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jonhenshaw on January 20, 2008

And whatever you do, use hexadecimal for your colors, not the color's name ;-)

Posted By: LadynRed on March 3, 2008

All well and good, but the proper order for pseudo-classes is Link, Visited, Hover, Active. Putting them out of that order can cause some unexpected results.

Posted By: LadynRed on March 3, 2008

All well and good, but the proper order for pseudo-classes is Link, Visited, Hover, Active. Putting them out of that order can cause some unexpected results.

You need to login to post a comment.