Jump to content

Archived

This topic is now archived and is closed to further replies.

glenelkins

CSS with PHP

Recommended Posts

Hi

if you goto: http://www.webdesignadvice.co.uk/clients/gerry/index.php?page=coinfo.html and put the mouse over "View Sites" and the link back to the home page (bottom left) the stylesheet uses "a:hover" to underline the text and change the colour. But, on the "View Sites" not all of them work like this. The url on the links on these are generated using PHP from a database, so what I need to know is why the top "View Sites" does not change but the second one does.

The PHP code for the "View Sites" link:

[code]
<?
echo "<a href='index.php?page=viewsites.html&company=" . $companies['company_id'] . "'>View Sites</a>";
?>
[/code]

Stylesheet code:

[code]
a {
text-decoration: none;
font-size: 10pt;
color: #0000CC;
}

a:hover {
text-decoration: underline;
color: #000000;
}

a:visited {
text-decoration: none;
color: #0000CC;
}
[/code]

Share this post


Link to post
Share on other sites
this is going to be purly css issue not php.. i had a look but cant think what would make them work first then not after being clicked.. maby try deleting the a:visited and see if that makes it work then you know it is issue with the visited one..

it could be because you set a:visited to text-decoration: none;


Regards
Liam

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.