[thelist] CSS: Not using .css

David Dorward evolt at david.us-lot.org
Sun Sep 8 15:10:01 CDT 2002


On Sun, Sep 08, 2002 at 01:11:22PM -0500, Ken Kogler wrote:
> > Depends on the browser. The extension should be irrelevent, but the
> > content type the server sends must be text/css for some browsers.
>
> Hmm... Does the type="text/css" tell the server how to send it, or the

No, it is just a suggestion for the client.

> client how to interpret it? I don't want to set the MIME type of ALL my
> .asp files to "text/css"...

You need to send a text/css header with each of your CSS files, but
setting the content type for all of them to text/css would be a bad idea
(after all, I'm sure some of them contain HTML).

If the document was PHP I'd do something like:

<?php
 header("Content-type: text/css");
?>
 body { etc.....

But as you are using ASP its time for a trip to Google.

http://www.google.com/search?num=100&hl=en&lr=&ie=ISO-8859-1&q=asp+content+type+header

leads me to http://www.w3schools.com/asp/prop_contenttype.asp

and: <%response.ContentType="text/css"%>


--
David Dorward                                   http://david.us-lot.org/
HTML email is a bit like using coloured paper and glitter ink on a CV.



More information about the thelist mailing list