catspaw ([personal profile] catspaw) wrote2011-08-14 05:36 pm

Help!

I'm trying to teach myself CSS and this is driving me NUTS!



I'm trying to change the 'a:visited' colour on the stylesheet. I want a different colour for it. I can change the 'a:link' to get it to look like I want to, and the 'a:hover' - but every. Single. Time. I change the text colour on the 'a:visited' bit, it changes the colour of ALL of the links in the style. I've looked at it, and looked at it, and LOOKED at it, but I'm damned if I can see why it won't work! What the hell am I doing wrong?

What I'm putting into the style sheet is

a:link {text-decoration:none; font-weight:normal; color:#003333;}
a:visited {text-decoration:none; font-weight:normal; color:#669933;}
a:hover {text-decoration:underline overline; font-weight:normal; color:#003333;}
a:active {text-decoration:none; font-weight:normal; color:#003333}

Just that, with no extra carets or anything. But I'm obviously missing *something* :-(



If anyone could help, I'd be awfully grateful! I'm sure I'm doing something really, really dumb :-(

[personal profile] nicci_mac 2011-08-14 08:58 pm (UTC)(link)
I cant see anything wrong with it, but I've got xim on the case. she'll take a look and if she cant find it, no one can. BTW - you've disabled comments over on LJ so I had to pop over her to reply.

[personal profile] nicci_mac 2011-08-14 09:01 pm (UTC)(link)
would it make any difference if you swapped the order, so that hover came before visited?
ximeria: (Default)

[personal profile] ximeria 2011-08-14 09:14 pm (UTC)(link)
it will always show up with the visited color when you've clicked on the link? As far as I can tell there's nothing off about your code.

[personal profile] nicci_mac 2011-08-14 09:21 pm (UTC)(link)
Okay - Xim just came up with something. There doesnt seem to be anything wrong with the code. However, if you have actually visited the pages in the browser you are using, they will naturally be showing the colour you set for 'visited'

Try closing down the browser completely and then reopen and see if the pages have gone back to the colour they were before you visited them, and if that doesn't work, empty the cache.
ximeria: (Default)

[personal profile] ximeria 2011-08-15 06:37 am (UTC)(link)
No, it shouldn't. I'll have another look at it when I come home, there are ways of getting it to work as far as I recall, but it takes a little digging in one of my reference books. Will let you know what I find.

ETA could you email me the whole css code - not just the ones above?
Edited ( ) 2011-08-15 06:38 (UTC)

[personal profile] nicci_mac 2011-08-15 07:27 am (UTC)(link)
Then there has to be another piece of code somewhere thats conflicting. I guess we'd have to see the whole thing and not just the bit you're trying to add.

PS - are you up for the Museum this coming weekend at all? *bounce bounce*