Chikwado Posted November 21, 2015 Share Posted November 21, 2015 (edited) Some one help explain this: Is it possible to wrapp css property in php. Example: <?php header('Content-Type: text/css'); .box{font-weight:bold;} Then may be you can include it in head section. Although I have not hear these story before. But I have seen something that look like that in Phpmyadmin. Edited November 21, 2015 by Chikwado Link to comment Share on other sites More sharing options...
Ingolme Posted November 21, 2015 Share Posted November 21, 2015 No, it's not possible to put CSS inside PHP blocks. You can put it outside of them, though. You can write CSS in PHP the same way you write HTML code in PHP: <?php header('Content-Type: text/css'); $color = '#ED0000'; ?> .error { border: 1px solid <?php echo $color; ?> color: <?php echo $color; ?>; } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now