View Full Version : Change Font Color (not links) on hover.

louis bloomfield
08-05-2010, 01:14 PM
hi guys,
my problem is simple, but when i go through the forums, i find the code for hovering over links....

<td align="center" onClick="MM_swapImage('blank_box','','images/projects_iam_subject_a_image_x.jpg',1)"><span style="cursor:pointer">Image 1 </span></td>

'image 1' is the text i want to change colour... I dont want all text on the page to change, just this one piece...

I cant find the code anywhere...

Thanks a bunch x 20.

08-05-2010, 01:34 PM
If I understand you correctly you could use a null link for this text. <a href="#"></a>. Possibly add a class to it so that you can target the text with CSS.

08-05-2010, 03:53 PM
You can use CSS to apply a :hover style to a span just like you can to a link. So if the span was:

<span class="change">text</spam>

The CSS rule:

.change:hover {
color: #00C;

would change the text to a dark blue on hover.

08-05-2010, 03:57 PM
That's a much better shout... I am losing my touch :(