PDA

View Full Version : Hyperlink Underline



recumbentdude
06-08-2006, 04:43 PM
Hi!

This is a very simple question. Here is what I'm trying to do:

I have several hyperlinks which have several different default colors on a webpage. I want to create a simple CSS script that underlines the hyperlink when a user performs a mouseover on the hyperlink. I created a simple code with the following:

<style type="text/css">
A:hover {text-decoration: underline;}
</style>

But this does not seem to be working. Could you suggest a simple way I could get this to work?

Many thanks for your help! I know it's a stupidly simple problem, but it is a little frustrating. Thank you again.

TeeGee
06-09-2006, 03:29 AM
You need to show the text decoration for a link when it's not being hovered over. Like this:



<style type="text/css">
a:link {text-decoration: none;}
a:hover {text-decoration: underline;}
</style>


Now the browser knows that the underline decoration is only in effect during the hover.