SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
-
Jun 28, 2001, 04:55 #1
- Join Date
- Mar 2001
- Location
- Kent, United Kingdom
- Posts
- 5,275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Problem with hyperlinks and their style settings - and it's driving me mad!
I have the style of all hyperlinks in my site defined in a css sheet, which, for the most part, work fine, but there are a few links here and there that don't respond the way they should. In fact, they don't respond at all.
The main link colour is green, the active link colour is silver and the visited link colour is again green, but some of the links stay green even when they're clicked on!
If it was all the links on certain pages or all the links set within tables, I could understand it, but that's not it. There's one on the home page, 3 or 4 on the links page and all the pro-photographers names in the pro-shots gallery - I thought this was something to do with them being in a table, but there's a link on the home-page in a table cell and that works fine.
I want to add a 'hover' style too, so that all the links underline on mouse-over, but there's no point until I can work out why some of them aren't responding.
Anyone got any ideas? If you want to check my code, it's the Postfive Website in my signature. Thanks.Saz: Naturally Blonde, Naturally Dizzy!
No longer Editor of the Community Crier.
Don't mind me, I'm having a BLONDE moment!
-
Jun 28, 2001, 05:39 #2
- Join Date
- Jan 2001
- Location
- Milton Keynes, UK
- Posts
- 1,011
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Saz,
I think it's the order of the pseudo classes. Swap the order of your active and visited classes and it should be ok. I'm not sure why some work and others don't though.
From the W3C's CSS2 spec
A:link { color: red } /* unvisited links */
A:visited { color: blue } /* visited links */
A:hover { color: yellow } /* user hovers */
A:active { color: lime } /* active links */
Note that the A:hover must be placed after the A:link and A:visited rules, since otherwise the cascading rules will hide the ’color’ property of the A:hover rule. Similarly, because A:active is placed after A:hover, the active color (lime) will apply when the user both activates and hovers over the A element.
-
Jun 28, 2001, 05:45 #3
- Join Date
- Mar 2001
- Location
- Kent, United Kingdom
- Posts
- 5,275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks Shane....that did the trick.
Odd that some worked with the styles in the wrong order though! I guess that IE for you!!!!Saz: Naturally Blonde, Naturally Dizzy!
No longer Editor of the Community Crier.
Don't mind me, I'm having a BLONDE moment!
-
Jun 28, 2001, 05:50 #4
- Join Date
- Feb 2001
- Location
- Stockport, UK
- Posts
- 729
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Fan bloody tastic!!
Thank you Shane for the answer and Saz for the question I have just spent 3 nights stumped by that one - if I had any hair left I would have been pulling it out in clumps.
-
Jun 28, 2001, 05:56 #5
- Join Date
- Mar 2001
- Location
- Kent, United Kingdom
- Posts
- 5,275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
So who's the wise one then, huh, Simon?!
I noticed the problem this morning, spent a few hours trying to work it out, realised I couldn't and posted here.
You, on the other hand, spent 3 days pulling your 'virtual' hair out
You know what....I'm glad I'm not the only one that couldn't work that one out by myself - I don't feel so stupid nowSaz: Naturally Blonde, Naturally Dizzy!
No longer Editor of the Community Crier.
Don't mind me, I'm having a BLONDE moment!
-
Jun 28, 2001, 06:15 #6
- Join Date
- Feb 2001
- Location
- Stockport, UK
- Posts
- 729
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well I'm stubborn like the Mule and not much prettier (although considerably less hairy).
“Virtual hair, all of the style, none of the fuss”
Bookmarks