Changing the Default Color for All Link States


If you want to change a link's default color, and if you want to have the same color apply to the link regardless of state, simply add a style rule to the style attribute of the link's anchor tag:

 <a href="../special.htm" style="color: #FF0000;">See Our Specials</a> 

In this example, the hyperlink always appears in red, no matter the state of the link or the default link colors.

Alternately, if the same formatting applies to more than one link on the page, you can create a class style to control the special hyperlink color:

 <style type="text/css">   a.special {     color: #FF0000;   } </style> <body>   <a  href="../special1.htm">See Our Specials</a>   <a  href="../special2.htm">See More Specials</a> </body> 

Now, any anchor tag that belongs to the special class has the same color properties, no matter the state of the link or the default link colors.



Web Design Garage
Web Design Garage
ISBN: 0131481991
EAN: 2147483647
Year: 2006
Pages: 202
Authors: Marc Campbell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net