Tottally lost in link problems

Discussion in 'CSS' started by grlnxtdor88, Mar 30, 2008.

  1. #1
    I have no clue whats wrong but my links are showing up underlined in default blue only on unvisted unactive links. They look right visted, hover, active. I don't know what it is, I have gone over everything, I suppose it's possible it's just my browser but I don't think so, I have firefox. If anyone can take a look at my page and let me know if there's something I can fix I would be extremely grateful.

    http://www.enjoythemoment.fantasy-nerd.com/main.html
    the css link is
    http://www.enjoythemoment.fantasy-nerd.com/main.css


    Thanks
    Amber
     
    grlnxtdor88, Mar 30, 2008 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    What you are seeing is the html applied link attributes. Just add the 'text-decoration:none' to the a{... in your css to do what you want.
     
    drhowarddrfine, Mar 30, 2008 IP
  3. mr_wonderful

    mr_wonderful Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you're missing two ending-brackets (one on a link def., one on the body def.). This should work:

    <style type="text/css">
    <!--
    a:link {text-decoration:none; color:#f3c;}
    a:visited {text-decoration:none; color:#f0c;}
    a:hover {text-decoration:none; color:#906;}
    a:active {text-decoration:none; color:#f3c;}
    h1 {font-family:veranda,tahoma,arial; color:#000;}
    p {font-family:veranda,tahoma,arial; color:#000;}
    body {font-family:veranda,tahoma,arial; color:#000; font-weight:normal; font-size:small;}
    -->
    </style>
     
    mr_wonderful, Mar 31, 2008 IP
  4. grlnxtdor88

    grlnxtdor88 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    that doesn't seem to have worked and i used the exact same code you provided. This is so frustrating, I have no clue whats wrong.
     
    grlnxtdor88, Apr 1, 2008 IP
  5. mr_wonderful

    mr_wonderful Peon

    Messages:
    128
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    My only other suggestion would be validating your html:

    Most importantly, close all your font tags!
     
    mr_wonderful, Apr 1, 2008 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Try it more like what Doc said. You do tend to see set-ups like a:link this, and a:hover that, but that's the long hard way of doing it.

    If you do
    a {
    text-decoration: none;
    color: #f3c;
    }

    Then that is what all links will be until you mention a more specific version (like a:hover). I haven't set anything for a:link in a long time. It's kinda worthless because something set on a:link will not override :visited, :hover, or :active if those are mentioned too. "a" has a more general meaning and thus is applied to everyone, until you say otherwise. a:link only applies to a:link and is easily overridden by the other a's.
     
    Stomme poes, Apr 1, 2008 IP
  7. grlnxtdor88

    grlnxtdor88 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I tried everything that everyone has suggested. I even tried vailidating the css and the site sxaid that everything is perfect, not one single error. And yet I can't get the default blue with the underlines to go away. Grrr. This is driving me nuts.:mad:
     
    grlnxtdor88, Apr 7, 2008 IP
  8. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Something's overriding everything. Lemme check.

    Oh, why do you have html tags in a css file?
    <style type="text/css">

    ^ this can't be at the top of your stylesheet. This belongs on the html page. Remove it. It's possible browsers are ignoring the stylesheet because of it.

    Similarly, get rid of </style>

    Anything with <stuff> must not be in a css sheet. To make CSS comments, use C-style commenting: /*this is a css-safe comment*/
     
    Stomme poes, Apr 8, 2008 IP
  9. grlnxtdor88

    grlnxtdor88 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Oh my God! It worked! Thank you so much. That is the weirdest thing, I've been writing css like that for years and never had problem before. But whatever now i know and can fix it.


    Thanks Againcc:p
     
    grlnxtdor88, Apr 8, 2008 IP
  10. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Well, it's okay if the CSS is on the HTML page, like
    <head>
    head stuff, meta, link, blah...
    <style type="text/css">
    css stuff blah...
    </style>
    </head>

    This is fine and legal. But when the CSS sheet moves off to its own document, then it's a problem. I'm not sure if there's some way you were doing it before that the browsers could ignore it... but anyway, glad it worked.
     
    Stomme poes, Apr 8, 2008 IP