HighDots Forums  

.css extension

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss .css extension in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dp
 
Posts: n/a

Default .css extension - 09-07-2004 , 05:56 PM






I recently changed a .css file to .asp to insert some server side code to
write different css elements based upon some data base criteria. IE and
Opera appear to process the .asp file and use the adjusted css. Mozilla and
Firefox ignore it completely and display the pages with no css.

I couldn't find anything stating I couldn't use server side scripting to
write a css file. Is there anything in the spec that prohibits it?

The HTML I'm using is
<link rel="stylesheet" type="text/css" href="css.asp">
__
dp



Reply With Quote
  #2  
Old   
Darin McGrew
 
Posts: n/a

Default Re: .css extension - 09-07-2004 , 06:42 PM






dp <noreplyhere (AT) hotmail (DOT) com> wrote:
Quote:
I recently changed a .css file to .asp to insert some server side code to
write different css elements based upon some data base criteria. IE and
Opera appear to process the .asp file and use the adjusted css. Mozilla and
Firefox ignore it completely and display the pages with no css.

I couldn't find anything stating I couldn't use server side scripting to
write a css file. Is there anything in the spec that prohibits it?
The style sheet is probably being sent with an incorrect Content-Type
header. See http://css.nu/faq/ciwas-aFAQ.html#QA05
--
Darin McGrew, mcgrew (AT) stanfordalumni (DOT) org, http://www.rahul.net/mcgrew/
Web Design Group, darin (AT) htmlhelp (DOT) com, http://www.HTMLHelp.com/

"It said 'Insert disk #3', but only two will fit..."


Reply With Quote
  #3  
Old   
Chris Sharman
 
Posts: n/a

Default Re: .css extension - 09-08-2004 , 03:03 AM



Darin McGrew wrote:

Quote:
dp <noreplyhere (AT) hotmail (DOT) com> wrote:
I recently changed a .css file to .asp to insert some server side code to
write different css elements based upon some data base criteria. IE and
Opera appear to process the .asp file and use the adjusted css. Mozilla and
Firefox ignore it completely and display the pages with no css.

The style sheet is probably being sent with an incorrect Content-Type
header. See http://css.nu/faq/ciwas-aFAQ.html#QA05
I expect so. The mozilla Tools > Web Development > Javascript Console
would confirm it.

Chris


Reply With Quote
  #4  
Old   
bonfils
 
Posts: n/a

Default Re: .css extension - 09-08-2004 , 07:12 AM



"dp" <noreplyhere (AT) hotmail (DOT) com> wrote

Quote:
I recently changed a .css file to .asp to insert some server side code to
write different css elements based upon some data base criteria. IE and
Opera appear to process the .asp file and use the adjusted css. Mozilla
and
Firefox ignore it completely and display the pages with no css.

I couldn't find anything stating I couldn't use server side scripting to
write a css file. Is there anything in the spec that prohibits it?

The HTML I'm using is
link rel="stylesheet" type="text/css" href="css.asp"
On the project I'm currently working on, the style sheets are all .asp
files.
We set the content type in the first line of these .asp files with this
code:

<%Response.ContentType="text/css";%>

That seems to work fine with Mozilla.

--
bonfils




Reply With Quote
  #5  
Old   
dp
 
Posts: n/a

Default Re: .css extension - 09-08-2004 , 07:54 PM



bonfils wrote:
Quote:
"dp" <noreplyhere (AT) hotmail (DOT) com> wrote in message
news:c0r%c.8807$ZC7.5342 (AT) newssvr19 (DOT) news.prodigy.com...
I recently changed a .css file to .asp to insert some server side
code to write different css elements based upon some data base
criteria. IE and Opera appear to process the .asp file and use the
adjusted css. Mozilla and Firefox ignore it completely and display
the pages with no css.

I couldn't find anything stating I couldn't use server side
scripting to write a css file. Is there anything in the spec that
prohibits it?

The HTML I'm using is
link rel="stylesheet" type="text/css" href="css.asp"

On the project I'm currently working on, the style sheets are all .asp
files.
We set the content type in the first line of these .asp files with
this code:

%Response.ContentType="text/css";%

That seems to work fine with Mozilla.

--
bonfils
Haf to remove the semi-colon, but that did the trick. Many thanks!
__
dp




Reply With Quote
  #6  
Old   
Evertjan.
 
Posts: n/a

Default Re: .css extension - 09-09-2004 , 03:46 AM



dp wrote on 09 sep 2004 in comp.infosystems.www.authoring.stylesheets:
Quote:
%Response.ContentType="text/css";%

That seems to work fine with Mozilla.

Haf to remove the semi-colon, but that did the trick. Many thanks!

Only if the IIS ASP server defaults to vbscript,
not necessary [removing the ;] if the default is set to jscript

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.