jlt67
08-20-2003, 03:25 PM
I am needing help with the code to use for a text link. I want the link to be a certain color, font style and font size. I want the test link color to be one color and then another color after visiting. I have tried all different kinds of code and cannot get the font style and font size to work. Also, will this code go before or after the </HEAD>?
css would be your solution. if you show the code you tried or page you tried it on, we could probably guide you in a good direction.
in the HEAD section :
<style type="text/css">
a:link {styles here;}
a:active {styles here;}
a:vlink {styles here;}
a:hover {styles here;}
.special a:link {styles here;}
.special a:active {styles here;}
.special a:vlink {styles here;}
.special a:hover {styles here;}
</style>
the first set of styles will go onto all normal links.
<a href="pagename.html"> click </a>
the second set of styles will only go onto the ones you class as special.
<a href="pagename.html" class="special"> click </a>
jlt67
08-20-2003, 03:47 PM
Here is what I used:
<style type="text/css">
A:link {text-decoration: none; text-color:#660066; text-font-family: comic sans ms; text-font-family: 18pt;}
A:vlink {text-decoration: none; text-color:#3300ff; text-font-family: comic sans ms; text-font-family: 18pt;}
body
{background-color: #9966666;}
</style>
My links ended up being in times roman, underlined and does not change color. Also my background is white.
kittycat
08-20-2003, 05:53 PM
Get rid of the 'text-' that you have before colour and font family. You have font-family listed twice, the second time it should be font-size (before the 18pt). Your background colour doesn't work because you have too many digits in the colour.
It would end up looking like this:
<style type="text/css">
A:link {text-decoration: none; color:#660066; font-family: comic sans ms; font-size: 18pt;}
A:vlink {text-decoration: none; color:#3300ff; font-family: comic sans ms; font-size: 18pt;}
body
{background-color: #996666;}
</style>