Previous Message
Next Message

Re: [css-d] css file extensions?

Sent by Chris Casciano on 31 January 2002 13:01

on 1/31/02 1:10 PM, Michael Efford at [EMAIL-REMOVED] wrote:

> I did this with Coldfusion, generating my stylesheet on the fly and using
> <link rel="StyleSheet" href="styles.cfm" type="text/css">
> But I found that Mozilla 0.97 wouldn't have a bar of it. Mozilla is
> apparently a very standard browser and I wanted my site to work on any
> future browsers. So I resorted to putting all my css inside my html files.
> Basically I think you can do it, but it won't validate properly.


I'm not sure where you ran into the problem. From my 5 second check with
Mozilla 0.9.7 it looks like its the text/plain mime type that it has the
most problems with, and that it seems to accept files outputted from php
with either text/html or text/css mime types. That said, I generally force
all my scripts to the proper mime type by opening them with something like
this (example in PHP):

header("Content-Type: text/css");

As I've done in this quick test which seems to work just fine in Moz 0.9.7:

The contents of the php file that is generating the style sheet is:


header("Content-Type: text/css");
echo "h1 { font-size:200px; }";

However in this example, with the headers set to text/plain (which is the
default on many servers) the header is of normal size:

As for validating the URI of a document really has nothing to do with

* as long as the chars are properly escaped of course.

Chris Casciano                  home >>
                                words >
[EMAIL-REMOVED]       fun >>>
Previous Message
Next Message

Message thread:

Possibly related: