Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Hyperlink

  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlink

    How can I create a hyperlink in HTML without underlying it.

    Thanks.

    http://www.hytechpro.com

  • #2
    New Coder
    Join Date
    Feb 2005
    Posts
    97
    Thanks
    7
    Thanked 7 Times in 7 Posts
    Well there are four different attributes for a link in CSS. The following should make it all kind of clear.

    Code:
    a:link { text-decoration:none; }
    a:visited { text-decoration:none; }
    a:hover { text-decoration:underline; color: red }
    a:active { text-decoration:none; }
    Hope that helps

  • #3
    New Coder
    Join Date
    Feb 2005
    Posts
    97
    Thanks
    7
    Thanked 7 Times in 7 Posts
    ooops I missed a semi colon after the color...

    Code:
    a:link { text-decoration:none; }
    a:visited { text-decoration:none; }
    a:hover { text-decoration:underline; color: red; }
    a:active { text-decoration:none; }
    fixed.

  • #4
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Quote Originally Posted by mattyod
    ooops I missed a semi colon after the color...

    Code:
    a:hover { text-decoration:underline; color: red; }
    
    fixed.
    Fwiw, the last item in a CSS rule doesn't require a closing semi-colon.
    It's there to keep neighbouring properties clear and separate.
    It's certainly a good habit to use them even on the last property of a rule, but just letting you know that it's optional and that the CSS isn't going to become invalid and the layout won't break if you happen miss it out.

    An academic point, but just putting it out there.


  •  

    Posting Permissions

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