jd2007 Posted July 19, 2007 Share Posted July 19, 2007 Can CSS contain variables which can be modified with php ? Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 19, 2007 Share Posted July 19, 2007 Yes Quote Link to comment Share on other sites More sharing options...
jitesh Posted July 19, 2007 Share Posted July 19, 2007 yes but can not write in css files. Example in php file $size = 10; $css = "<style type=text/css> .stylecss{ font-size:".$size." } </style>"; Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 19, 2007 Author Share Posted July 19, 2007 thanks... Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 20, 2007 Author Share Posted July 20, 2007 how do i use the css code above to change text font ? Quote Link to comment Share on other sites More sharing options...
sKunKbad Posted July 20, 2007 Share Posted July 20, 2007 if ($youwantbold){ $weight = 'bold'; echo "<p style='font-weight:$weight;'>You wanted bold so here is some bold text! Yay for bold!</p>"; } Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 20, 2007 Author Share Posted July 20, 2007 thanks... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.