soycharliente Posted September 12, 2009 Share Posted September 12, 2009 I'm trying to link a PHP file for my CSS file. I've done it before with no problems, but for some reason it's not working now. (It does work in IE7 however -- which is weird.) Link to not working page Link to page that uses it and works Can anyone help me figure out why? Let me know if you need more information. The only PHP code that is in the css.php file is some global variables to help me update multiple classes/ids more quickly. Basically using certain widths throughout to build faster. Quote Link to comment https://forums.phpfreaks.com/topic/174000-solved-php-file-as-a-css-file/ Share on other sites More sharing options...
yettti Posted September 12, 2009 Share Posted September 12, 2009 just an idea but have you tried setting the header information to header('Content-type: text/css'); (place at top of script) Quote Link to comment https://forums.phpfreaks.com/topic/174000-solved-php-file-as-a-css-file/#findComment-917215 Share on other sites More sharing options...
Daniel0 Posted September 12, 2009 Share Posted September 12, 2009 Works for me. Quote Link to comment https://forums.phpfreaks.com/topic/174000-solved-php-file-as-a-css-file/#findComment-917222 Share on other sites More sharing options...
soycharliente Posted September 12, 2009 Author Share Posted September 12, 2009 @yetti: In which file? Doesn't the link tag take care of this for me? I'm not above trying it, just seems like double. @Daniel0: What's your OS and browser? Quote Link to comment https://forums.phpfreaks.com/topic/174000-solved-php-file-as-a-css-file/#findComment-917250 Share on other sites More sharing options...
soycharliente Posted September 12, 2009 Author Share Posted September 12, 2009 Yetti's suggestion made it work. Weird how I don't do that on the other link I listed and it works fine in all browsers. Hmmm. Anyway, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/174000-solved-php-file-as-a-css-file/#findComment-917252 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.