Results 1 to 2 of 2

Thread: Hyperlink Underline

  1. #1
    Join Date
    Jun 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hyperlink Underline

    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.

  2. #2
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You need to show the text decoration for a link when it's not being hovered over. Like this:

    Code:
    <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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •