Click to See Complete Forum and Search --> : WANTED: Advice on Simple CSS Links


kwilliams
12-10-2003, 11:37 AM
Basically. the basic links for my CSS show up with the default blue. This is the beginning of my site's CSS concerning link properties:
<style type="text/css">
a:link {font-family:arial; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-decoration:underline; color:330066; }
a:visited {font-family:arial; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-decoration:underline; color:330066; }
a:hover {color:ff0000; text-decoration:none;}
a:active {font-family:arial; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-decoration:underline; color:330066; }

I made sure to put the selectors in the W3 suggested order of:
a:link
a:visited
a:hover
a:active

...but something weird happens. When I attach this CSS as a server-side include, it works fine. But when I try to change the SSI to a linked CSS (i.e. <link rel="stylesheet" href="ScriptLibrary/stylesheet.css">), it doens't work properly.

You can see an example of how my CSS works here:
http://www.douglas-county.com/index.asp
And how it doesn't work here:
http://www.douglas-county.com/index2.asp

Any suggestions would be appreciated. Thanks.

pyro
12-10-2003, 11:45 AM
You forgot the # before all your colors.

kwilliams
12-10-2003, 11:49 AM
Hi pyro,

I tried it with & without the #, but it didn't make a difference in my problem. I'll make sure to add # before my font colors, but this won't solve my problem. Any other suggestions?

KWilliams

kwilliams
12-10-2003, 11:52 AM
I'm viewing the 2ns example page in IE6 also, and it shows visited links correctly. But all links that have never been visited by me are in the default blue.

KWilliams

pyro
12-10-2003, 11:52 AM
In your external stylesheet, get rid of <style type="text/css"> and </style>.

kwilliams
12-10-2003, 11:55 AM
That's a good suggestion, but unfortunately it didn't make a difference. I'm so confused.

KWilliams

pyro
12-10-2003, 12:12 PM
By looking at your external stylesheet, it does not appear that you have made either of the two suggestions that I have made. Please try them.

kwilliams
12-10-2003, 12:16 PM
I did infact make those changes to the external stylesheet that's shown on http://www.douglas-county.com/index2.asp, but I had referenced stylesheet.css, not stylesheet2.css. When I corrected this, the page worked properly. Thanks for yoru help Pyro, and have a great afternoon.

KWilliams

pyro
12-10-2003, 12:17 PM
You are welcome.