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
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.
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>
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.
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.
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.
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*/
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
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.