Results 1 to 3 of 3

Thread: Link Underline Script

  1. #1
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Link Underline Script

    Hi,

    I need a script where the link is underlined, and when mouseovered, the underline changes color but not the text. The text also must become italic.
    Any help would be appreciated.

    Thanks

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    No javascript required, that can be done with style:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <style type="text/css">
    a {
    text-decoration:none;
    border-bottom:1px solid navy;
    }
    a:hover {
    font-style:italic;
    border-bottom-color:red;
    }
    </style>
    <!--[if IE]>
    <style type="text/css">
    a {
    display:inline-block;
    }
    </style>
    <![endif]-->
    </head>
    <body>
    <a href="#">Test</a>
    </body>
    </html>
    Last edited by jscheuer1; 02-07-2008 at 01:16 AM. Reason: remove extraneous code
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2008
    Posts
    12
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Thanks

    Thank you

    Just what I needed

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
  •