Page 1 of 1

using CSS in links

Posted: Wed Feb 25, 2004 7:05 am
by struggling_student
Hi everyone - I have a problem concerning the use of CSS in PHP links. I have set up the following:

<head>
<style>
A.Link:link { color: blue; text-decoration: none;}
A.Link:visited { color: #000080; text-decoration: none;}
A.Link:hover { color: black;}
A.Link:active { color: #000080;}
</style>
</head>


and am trying to use it in

echo '<a href="databases.php?database='.$db.'" class="Link">';
echo $db;
echo '</a><br>';

although the link does change colour when the cursor hovers over it, the link is still underlined when it's displayed on the page when I've clearly stated that it shouldn't be.

However, if I try to use the css class in basic html it works perfectly. Can anyone help me with this problem? Obviously I need to use it within PHP as I'm calling PHP variables within it but it doesnt seem to be working with me!!!

Thanks in advance!!

Posted: Wed Feb 25, 2004 7:35 am
by basdog22
If tested with IE only try testing it with Opera or Mozilla.

Try this :

a{ color: blue; text-decoration: none;}
a:visited { color: #000080; text-decoration: none;}
a:hover { color: black;}
a:active { color: #000080;}

Posted: Wed Feb 25, 2004 8:01 am
by struggling_student
Excellent.... thanks!!!