How to make links not underlined

Discussion in 'CSS' started by netpox, Apr 13, 2007.

  1. #1
    How do i make my links not underlined in css?
     
    netpox, Apr 13, 2007 IP
  2. PFCritics

    PFCritics Peon

    Messages:
    107
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you're referring to all links, here's an example of my site, where the only time a link will be underlined is when you hover over it:

    a:link {color: #075485; background: none; text-decoration: none;}
    a:visited {color: #075485; background: none; text-decoration: none;}
    a:active {color: #075485; background: none; text-decoration: none;}
    a:hover {color: #000000; background: none; text-decoration: underline;}
    HTML:
    It's based on the "text-decoration: none" or "text-decoration: underline" portion of the coding.
     
    PFCritics, Apr 13, 2007 IP
  3. parab

    parab Banned

    Messages:
    502
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #3
    check out css of this page itself..

    you'll know
     
    parab, Apr 13, 2007 IP
  4. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #4
    PFCritics has got it right, you know.

    If you just need a particular hyperlink not underlined, then you can assign a class name to it, and then add the "text-decoration: none" to it.
     
    Clive, Apr 13, 2007 IP
  5. Rich_H

    Rich_H Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Should be

    a:link, a:visited, a:active {color: #075485; background: none; text-decoration: none;}
    a:hover {color: #000000; background: none; text-decoration: underline;}

    No need for the multiple declarations if they are the same.


    Rich
     
    Rich_H, Apr 14, 2007 IP
  6. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #6
    1- if u r using Dreamweaver MX then choose that css style in which u want to make text not underline double click at that class
    2- go to text option tab which is first tab and choose none
    now all the links which r using that class will not underlined
     
    Jalpari, Apr 14, 2007 IP
  7. Lively1

    Lively1 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    That also works if you are linking to images as well that can sometimes bug out in Firefox
    img a:link {text decoration: none}
     
    Lively1, Apr 15, 2007 IP