Results 1 to 4 of 4

Thread: Removing underline from an anchor?

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

    Default Removing underline from an anchor?

    I always see that underline effect whenever i create a text with link using anchor. Is there any way to remove it or other code or tag i can use instead? Thks.

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    you can use CSS to get rid of that line. A sample code would be like this:

    Code:
    <style type="text/css">
    a:link {text-decoration: none;} //the original link with no underline
    a:visited {text-decoration: none;} //the visited link with no underline
    a:hover {text-decoration: underline;} //mouseover link and an underline appears
    </style>
    a brief explination:

    a:link is the plain link,
    a:visited is a visited link
    a:hover is a link when the mouse moves over it

    text-decoration is the marking or effect for the link

    you can find more details about CSS on this website as well as looking around google for it.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Just place the above code in the <head> of every page, or add it to your stylesheet, and you'll have what you need.

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jewellim View Post
    I always see that underline effect whenever i create a text with link using anchor. Is there any way to remove it or other code or tag i can use instead?
    It can be removed using CSS, however it should not when the anchor is amongst text; colour alone should not be used to indicate a hyperlink.

    Mike

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
  •