css variables with style.php
-
I’m trying out this example from https://www.barelyfitz.com/projects/csscolor/
I put the html file and the style.php file in the same folder, copying the style.php straight from the example, but get no results as you can see at https://neighborsconnect.us/test/css-variables.html
The html file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>CSS Variables</title> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <link rel="stylesheet" type="text/css" media="screen" href="style.php"> </head> <body> <h1>This is h1 test.</h1> This is some body text. <h2>This is h2 test.</h2> <blockquote>This is some blockquote text. </blockquote> <h3>This is h3 test.</h3> <h4>This is h4 test.</h4> </body> </html> </blockquote> The style.php file: <blockquote> <?php header("Content-type: text/css"); $white = '#fff'; $dkgray = '#333'; $dkgreen = '#008400'; ?> body { background:<?=$white?>; color:<?=$dkgray?>; } h1, h2, h3, h4 { color:<?=$dkgreen?>; } blockquote { color:<?=$dkgreen?>; }
What am I missing here?
Bruce
- The topic ‘css variables with style.php’ is closed to new replies.