Web Hosting Talk







View Full Version : CCS question - Why doesn't this work?


Ron
12-03-2002, 03:18 AM
The following is the CCS Styles code I am using for links on my site:

a { color: #006363; font-size: 70%; text-decoration: none; line-height: 150%;}
a:hover { color: #000000; font-size: 70%; text-decoration: underline; }
a:active { color: #000000; font-size: 70%; text-decoration: underline; }

Everything works except a:active. It has no effect whatsoever. Can anyone tell me why?

My url is:

http://www.legendtravelers.com

Many thanks!

rockergrrl
12-03-2002, 04:01 AM
Try and use relative numbers (aka pixels) when it comes to font size. Percentages don't work half the time -- it depends on the default font size in the browser.

Check out A List Apart --
http://www.alistapart.com/stories/fear4/

Ron
12-03-2002, 06:41 AM
Thanks for your suggestion rockergrrl. I probably should change to relative numbers.

But that doesn't explain why a:active doesn't work. The other two lines of code work. When I mean when I say "a:active" doesn't work, I mean that the color of the visited links do not change after they are click on.

Can you explain why?

Acronym BOY
12-03-2002, 06:51 AM
active!=visited

Acronym BOY
12-03-2002, 06:55 AM
Oh yeah, try here:

http://www.w3.org/TR/REC-CSS1#anchor-pseudo-classes

Google-ing for CSS link color brings up a few hundred relavant pages as well as the above link.

Reptilian Feline
12-03-2002, 10:49 AM
Active = selcted using the tab-key or click and hold with the mouse. You have both hover and active as the same style, so there is no differens. Change the style for active to color:red and see what happens.

dbbrock1
12-03-2002, 11:39 PM
Just to let you know, It's CSS not CCS :)