Jump to content


Photo

CSS with PHP


  • Please log in to reply
2 replies to this topic

#1 glenelkins

glenelkins
  • Members
  • PipPipPip
  • Advanced Member
  • 760 posts
  • LocationBridlington - East Riding of Yorkshire - United Kingdom

Posted 11 August 2006 - 01:54 PM

Hi

if you goto: http://www.webdesign...age=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:

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

Stylesheet code:

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

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

a:visited {
	text-decoration: none;
	color: #0000CC;
}

http://thewebsolutionprovider.com - A Solution For Everything Web!

#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 11 August 2006 - 01:59 PM

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
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge

#3 glenelkins

glenelkins
  • Members
  • PipPipPip
  • Advanced Member
  • 760 posts
  • LocationBridlington - East Riding of Yorkshire - United Kingdom

Posted 11 August 2006 - 02:14 PM

That worked a treat, thanks
http://thewebsolutionprovider.com - A Solution For Everything Web!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users