Dynamically change css in php? -
i have little question. can dynamically change (with php) content of css style in way?
<?php header("content-type: text/css; charset: utf-8"); $color = "red;"; ?> header { color:<?php print $color; ?> } ?>
sure it's possible, why not give try?
linking php css in html:
<link rel="stylesheet" type="text/css" href="css/name-of-file.css.php">
and in css.php file put code, without
<style type="text/css">
so should this
<?php header("content-type: text/css; charset: utf-8"); $color = "red;"; ?> header { color:<?php print $color; ?> }
Comments
Post a Comment