Link to home
Start Free TrialLog in
Avatar of LERNWebmaster
LERNWebmaster

asked on

Include dynamic style sheet

I would like to link to a dynamic style sheet created in CF (<link href="CSS.cfm" rel="stylesheet" type="text/css">) (it is being linked on a CF page). I've added <cfcontent type="text/css; charset=ISO-8859-1"> to the css.cfm and the page displays correctly in in IE and Mozilla, but the stylesheet isn't applied in Netscape or Opera?

::Stylesheet::
  <cfcontent type="text/css; charset=ISO-8859-1">
 <cfquery name="userSettings" datasource="barney">
     SELECT * FROM userSettings WHERE user=#authenicatedUserID#
 </cfquery>
<style type="text/css">
   <!--
     .NormalText {  font-family: <cfoutput>#userSettings.normalFont#</cfoutput>;}
    -->
</style>

I can make it work in all browsers, by using a cfinclude, but I would prefer to link to the dynamically generated CSS.

How can I get this to work w/ Netscape & Opera (while still working in IE & Mozilla) using the link implementation?
SOLUTION
Avatar of jake3362
jake3362

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LERNWebmaster
LERNWebmaster

ASKER

Thank you for the suggestion, I would rather not write CSS files for each user each time, as over time I'm going to have a lot of CSS files to clean out and the constant disk writes would affect performance.  Any others?  I was thinking that I'm just not setting the content type correctly.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
using the single quotes isn't necessary, as the data type for user is int.
thank you for accepting my answer LERNWebmaster  .. however, if my answer was the accepted answer.. why the low C grade?