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 7 of 7
  1. #1
    New Coder
    Join Date
    Sep 2012
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Remove underline from link - But still make cursor show hand?

    Hi, does anyone know how to make links without underline, but still have the cursor/mouse know its a link and show a hand-cursor?

    Thanks!

  • #2
    Regular Coder stevenmw's Avatar
    Join Date
    Jun 2007
    Location
    OK
    Posts
    497
    Thanks
    27
    Thanked 31 Times in 31 Posts
    Code:
    text-decoration: none;

  • #3
    Banned
    Join Date
    Sep 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You got to use the style attribute as style="text-decoration:none" in the link tag as shown below:

    <a href="http://www.codingforums.com" style="text-decoration:none">The Coding Forums</a>

    Write this code in between the <head></head> tags, and then place your links normally.
    Last edited by oliviacis; 10-01-2012 at 07:47 AM.

  • #4
    Regular Coder stevenmw's Avatar
    Join Date
    Jun 2007
    Location
    OK
    Posts
    497
    Thanks
    27
    Thanked 31 Times in 31 Posts
    oliviacis, Please make sure to wrap your code.

    John, it doesn't have too be that complicated.

    Use a separate stylesheet aside from your html page and use

    Code:
    a:link {
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    }
    
    a:active {
    text-decoration: none;
    }
    
    a:hover {
    text-decoration: none;
    }
    This will take the underline away from every single link on your page. Doing it the way oliviacsis said would only take the underline away from the individual link.

    Of course you can have multiple link styles by assigning a link state to a div, and all of the links in that div will refelct that link style.

    Code:
    #wrap a {
    text-decoration: none;
    }
    Last edited by stevenmw; 10-01-2012 at 08:22 AM.

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,662
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    stevenmw, it goes even less complicated:
    Code:
    a {text-decoration: none;}
    will take care of all anchor elements, no need for the pseudo classes. Those are only needed if you use a:link.

  • #6
    Regular Coder stevenmw's Avatar
    Join Date
    Jun 2007
    Location
    OK
    Posts
    497
    Thanks
    27
    Thanked 31 Times in 31 Posts
    Quote Originally Posted by VIPStephan View Post
    stevenmw, it goes even less complicated:
    Code:
    a {text-decoration: none;}
    will take care of all anchor elements, no need for the pseudo classes. Those are only needed if you use a:link.

    I just wanted to be detailed in case john6 wanted to customize each pseudo class.

  • #7
    Banned
    Join Date
    Sep 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I just replied to what john6 asked. He dint mention if he wants to remove the underline of all links in the entire page. Anyways, thanks for adding more info to my reply.


  •  

    Posting Permissions

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