DEFINING STYLES FOR LINKS
A s mentioned in the above table, there are four different selectors with respect to links.
Y ou can specify whatever style you'd like to each of these selectors, just like you'd do with normal text.
T he four selectors are:
Defines the style for normal unvisited links.
Defines the style for visited links.
Defines the style for active links.
A link becomes active once you click on it.
Defines the style for hovered links.
A link is hovered when the mouse moves over it.
Note: Not supported by Netscape browsers prior to version 6.
Here you can see a few examples on how CSS can be used to replace the traditional image based mouseover effects for links.
The hover style is not supported by Netscape browsers prior to version 6, but since it does no harm, you can still use it for the benefit of the +90% of visitors that arrive using MSIE).
One of the most common uses of CSS with links is to remove the underline. Typically it's done so that the underline appears only when a hover occurs. In the example below, we did just that. In addition we added a red color for hovered links.
| <style type="text/css">
font-family: Geneva, Arial, Helvetica, sans-serif;
<a href="#" class="menu">EXAMPLE</a>
The link from the above example would look like this: