Forum Moderators: not2easy
(mytest.php)
<!doctype html public "~//w3c//dtd html 4.0 transitional//en">
<html><head><title>php-css-test<title>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body><a href="linkme.php">Link Me Here</a>
</body></html>
------------------
(mystyle.css)
<?php header("content-type: text/css");?>
<?php $linkcolor = "00FF00"; $hovercolor="0000FF";?>
a {
color:#<?php echo $linkcolor;?>;
}
a hover {
color:#<?php echo $hovercolor;?>;
}
This may be the thread you are looking for:
[webmasterworld.com...]
One potential problem: are your .css files parsed for PHP? If not, you will need either to do so, or you can simply name your stylesheet file with a PHP extension:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>php-css-test<title>
<link rel="stylesheet" type="text/css" [b]href="mystyle.php"[/b]>
</head>
<body><a href="linkme.php">Link Me Here</a>
</body></html> PS. your listed doctype was incorrect - I would suggest the one I gave above ;)
If you can provide any further input, or maybe shake the tree of the person who posted the original solution, I'd be grateful.
Thanks again for the response.