link underlined............ahhhhh

Discussion in 'CSS' started by ANDYJH, Mar 17, 2008.

  1. #1
    Hi Guys

    Please help with this little problem

    I have created a css with a:link {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 9px;
    color: #0000FF;
    text-decoration: none;
    }

    The rest of the page is using the other elements of the css, but i cant get rid of the underline.

    any ideas??
     
    ANDYJH, Mar 17, 2008 IP
  2. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Have you tried simply,
    
    a
    {
    text-decoration: none;
    }
    
    Code (markup):
    As far as i am aware, a:link selects all the links that are unvisited. Therefore, the link in your case has prob been visited.

    If you insist on using a:link. Apply the same styles to, a:visited, a:active and a:hover.

    That may be the problem.

    nicangeli
     
    nicangeli, Mar 17, 2008 IP
  3. ANDYJH

    ANDYJH Guest

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    many thanks, makes sense i will give it a go...........
     
    ANDYJH, Mar 17, 2008 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    RIght, a:link will not be inherited by a:hover or a:focus etc, but a by itself will be (unless you say something else for a specific pseudo element like a:hover...) and whatever comes last will usually have precedence, so start with the a and add the specials you want for stuff like :hover later.
     
    Stomme poes, Mar 18, 2008 IP