Tuesday, November 3, 2009

Changing Link Colours with CSS

To affect the entire document:

a:link {color:#FF0000}
a:visited {color:#00FF00}
a:hover {color:#FF00FF}
a:active {color:#0000FF}
* Note: a:hover MUST come after a:link and a:visited, a:active MUST come after a:hover

To define a specialised class:

a.Calendar:link {color:Black;}
a.Calendar:visited {color:Gray;}
a.Calendar:hover {color:Gray;}
a.Calendar:active {color:Black;}

To use it, set HyperLink or LinkButton control CSSClass to "Calendar".


No comments:

Post a Comment