Page 1 of 1

CSS, Links and Hovers

Posted: Tue Oct 07, 2003 3:37 pm
by Toneboy
Can't seem to get this right. When showing a link in the "Feedhead" class (so called because it is a header for a feed, before anyone asks) it won't display the link in white, just red (as set earlier).

I have tried searching about for an answer on this, but I think it falls into the category of "What do you put in to look for that?" :) So I thought I'd see if a kind expert could help. Here's the code:

Code: Select all

<style type="text/css">
<!-- 
P &#123; font: 12pt times new roman, serif;&#125;
H3 &#123; font: bold 14pt times new roman, serif;&#125;
H2 &#123; font: bold 18pt times new roman, serif;&#125;
H1 &#123; font: bold 24pt times new roman, serif;&#125;
A:link &#123;color:#FF0000; TEXT-DECORATION: underline&#125;
A:visited &#123;color:#FF0000; TEXT-DECORATION: underline&#125;
A:active &#123; TEXT-DECORATION: underline&#125;
A:hover&#123;color:#a50400; TEXT-DECORATION: underline&#125;
P.menu &#123;font: 10pt Arial, sans-serif;&#125;
P.visitors &#123;font: bold 10pt Arial, sans-serif;&#125;
P.printthispage &#123;font: 9pt Arial, sans-serif;&#125;
P.photo &#123;font: bold 8pt Verdana, Arial, sans-serif;&#125;
li.photo &#123;font: bold 8pt Verdana, Arial, sans-serif;&#125;
P.side &#123;font: bold 14pt Arial, sans-serif;&#125;
td &#123; font: 12pt times new roman, serif;&#125; 
th &#123; font: bold 12pt times new roman, serif;&#125;
td.title &#123;font: bold 18pt Arial, sans-serif;&#125;
li &#123; font: 12pt times new roman, serif;&#125; 

P.feed &#123;font: 8pt Arial, Verdana, sans-serif;&#125;
font.feed &#123;font: 8pt Arial, Verdana, sans-serif;&#125;
font.feedupdate &#123;color:#C0C0C0; font: 8pt Arial, Verdana, sans-serif;&#125;
td.feed &#123;font: 8pt Arial, Verdana, sans-serif;&#125;

td.feedhead &#123;font: bold 10pt Arial, Verdana, sans-serif; color:#FFFFFF&#125;
A.feedhead:link &#123;font: bold 10pt Arial, Verdana, sans-serif; color:#FFFFFF&#125;
A.feedhead:visited &#123;font: bold 10pt Arial, Verdana, sans-serif; color:#FFFFFF&#125;
A.feedhead:active &#123;font: bold 10pt Arial, Verdana, sans-serif; color:#FFFFFF&#125;
A.feedhead:hover &#123;text-decoration: underline; color:#FFFF00&#125;
-->
</style>
As the links are within <td> brackets, does the css need to show something like this?:

Code: Select all

td.A.feedhead:link &#123;etc.&#125;
Thanks in advance.

Posted: Tue Oct 07, 2003 3:55 pm
by microthick
I've tested your style sheets with both IE 5.5 and Firebird 0.6.1 on Win2k and on both environments, your feedback class works fine. Links appear white with a yellow hover.

Posted: Tue Oct 07, 2003 5:14 pm
by McGruff
Contextual selector syntax is a space separated list of parents (tags or classes) finishing with the tag to which this style will be applied, when found within the parent tags.

Try this:

td.feedhead a:link {..etc..}

Posted: Wed Oct 08, 2003 5:28 pm
by Toneboy
Excellent - thanks very much McGruff.

(BTW I work in Glasgow - do you work there, or just reside there?)

Posted: Wed Oct 08, 2003 6:25 pm
by McGruff
Work in Glasgow, sort of live there too although that starts to get complicated to explain. My hobbies are getting into fights on trains (two so far this year) and getting knocked down as I cycle about the city (5 times in total).

Ah Glasgow!

Posted: Fri Oct 10, 2003 7:20 am
by Toneboy
I'm in and out of the city every weekday, on a train to/from Argyle Street. I'm amazed that anyone can find the space to swing a punch on a train which passes through Glasgow! :lol: