I am using php to generate a css file, declaring a header like:
<?php
header("Content-type: text/css; charset: UTF-8");
?>
and passing the url from index.php like:
<link href="http://www.site.com/css.php?style_profile=2" media="screen" rel="stylesheet" type="text/css" />
I can't get this file to validate from the w3c css validator because it doesn't recognize the file type. This is the error I keep getting:
Unknown error org.w3c.www.http.HttpInvalidValueException: Invalid content type.
Is there any way to get this to validate without manually pasting the css data? If not, is there any other validation service that will recognize a css.php file (or one with get vars attached, if that is the issue causing the error)? I'd really like to be able to validate by link and not have to cut and paste the css for every single page on my site.
I don't know if this will resolve your problem (unable to test right now), but it is something that I noticed:
According to the W3 spec, your PHP header is incorrect, and it should read charset=utf-8
.