Luke Melia


February 26, 2002

2/26/02, 8:33 pm

Tech note: This page was rendering in Mozilla without the stylesheet being applied for some reason, which was baffling me, because it works fine in Netscape 6, Mozilla’s progeny. It sucked, because the page pretty much falls apart without the stylesheet. Thanks to a similar problem that John M. found a solution for, I figured out mine, too.

It seems that Mozilla is very particular about it’s CSS files. They have to come back from the web server with the Content-Type set to text/css. On my site, I had set the mime type for files with .css extensions to “application/x-httpd-php” so that I could use some php code to dynamically write some values and thereby address an IE5 bug. I guess this mime type was being preserved in the reply. In order to get the server to send the appropriate header, I had to add the following php code to the beginning my .css file: header(“Content-Type: text/css”);

Leave a Reply created 1999. ··· Luke Melia created 1976. ··· Live With Passion!