View Full Version : External CSS problems...


abutton
07-13-2006, 03:09 PM
Hello there, everyone!

I'm not sure if this question has an answer, other than my hosting is acting weird again (it's happened before...). My style sheet wasn't working quite right--the links were their normal bright blue with underline. The rest of the links were working fine (the hover, active, and visited). I couldn't get it fixed, so I tried moving the external style sheet into the <head> of my page. And then it worked. So I got everything set just how I liked it, and then moved it back to an external style sheet (I just copied & pasted, so I didn't change anything.) because I want to use it on more than one page. But now the links aren't right again.

So does anyone know why that might be? Is it just a problem with my hosting?

Here's my code:

<style type="text/css">

A:link {
text-decoration: none; color: #009900; font-weight: bold; }

A:visited {
text-decoration: none; color: #009900; font-weight: bold; }

A:hover {
text-decoration: underline; color: #ffffff; font-weight: bold;
background-color: #009900; }

A:active {
text-decoration: none; color: #009900; font-weight: bold; }

</style>

Thanks in advance!!
-Audrey-

Arwen
07-13-2006, 03:20 PM
Your codes look fine. Can we see your page?

bourdelson
07-13-2006, 03:48 PM
Did you take the <style> tags out of your external CSS? If not, try that and see if it works.

abutton
07-13-2006, 04:39 PM
Thank you, bourdelson! Taking the <style> tags out worked wonderfully! Do you know why that is? Because everything else was working....

pb&j
07-13-2006, 05:02 PM
the call line in the html page already states that the css being included is a STYLE format. putting the STYLE tags into an external page confuses the browser as that is now an "extra" set inside itself.

usually, just the links get messed up by that type of error, so not many people realize it until it happens like it did with you. it happens a lot.

abutton
07-14-2006, 01:17 AM
Okay, that makes sense! :) (I love it when things make sense! :)) Thanks so much for your help!

-Audrey-

pb&j
07-14-2006, 05:18 AM
well, apart from that, IE is kinda buggy anyways ;)

have fun with css :D