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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.