Jump to content

CSS with PHP


glenelkins

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]
Link to comment
https://forums.phpfreaks.com/topic/17243-css-with-php/
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
Link to comment
https://forums.phpfreaks.com/topic/17243-css-with-php/#findComment-73087
Share on other sites

Archived

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

×
×
  • Create New...

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.