HTML code, changing text size and font on link tags.?

gell1981

New member
Im looking to change the size and font of the text on links that you hover where the colour of the text changes. This is what i have so far..

<style type="text/css">
a:link {color: white}
a:visited {color: white}
a:hover {color: black}
a:active {color: #00FFFF}

</style>
 
I do background and color changes a lot, using something like
a:active,a:hover,a:focus{background:yellow; color:red;}
as a stylesheet line for a whole site. (Obviously, the color choices are up to you, and I see mine got eaten a bit by Y!A because of line length.)

Notice a couple things here: the first is that I use a:focus along with the other cases. Sometimes, it's useful to tab through the links on a page, and this causes the same color changes to highlight a link when it becomes the focus point.

The next thing to notice is that I don't mess with changing size, weight, or family of the font. Moreover, I specifically disrecommend doing so, because it can change the size of the link on the page and force the whole page to be respaced. There's very little that's more annoying than having elements surrounding the link move around just because you hover on the link. It pulls the user's attention away from the element both you and they want to have their full attention: the link itself.

The only thing in Web design that's even better than knowing how to do lots of things, is knowing which of them not to do.
 
Back
Top