Thanks Mike and everyone else. :) Saturday
---------- Original Message ---------------------------------- From: "Dawson, Michael" <[EMAIL PROTECTED]> Reply-To: [email protected] Date: Thu, 23 Dec 2004 09:29:17 -0600 >This topic came up a several days ago. Read the archives for more >details than what I can remember right now. > >1. Create multiple CSS files. One file will contain only layout and >formatting. Then, create individual CSS files that contain only color >information. You would have an individual CSS file for each color >theme, however, you only need a single CSS file for layout. In your CF >template, just use a CF construct to determine which CSS "color" file to >use. This is nice because the browser can cache the CSS files. > >2. Use CF to generate the CSS dynamically and use CFCONTENT to pass the >correct CSS document type. (More information in these archives.) This >is not as good because CF must process the CSS page, then then send it >to the browser. The browser won't cache the CSS. > >M!ke > >-----Original Message----- >From: Stuart Kidd [mailto:[EMAIL PROTECTED] >Sent: Thursday, December 23, 2004 9:16 AM >To: CF-Talk >Subject: CF tags work inside of CSS > >Hi, > >I have a colour theme which changes each month. Instead of having 12 >different stylesheets to cover for the year i wanted to have some CF >code at top of my CSS page, something like: > ><cfswitch expression="#thisMonth#"> ><cfcase value="january"> ><cfset myColour = "#08BF83"> ></cfcase> ><cfcase value="february"> ><cfset myColour = "#085F83"> ></cfcase> ><cfcase value="march"> ><cfset myColour = "#08B383"> ></cfcase> ></cfswitch> > >So when I get down to the part in the stylesheet which says: > >a.preferences:hover { > color: #FFFFFF; > background-color: #8DC63F; > padding-top: 0px; > padding-right: 6px; > padding-bottom: 0px; > padding-left: 6px; > border: 1px solid <cfoutput>#myColour#</cfoutput>; > margin: 5px 4px; > text-decoration: none; > font-size: 10px; >} > >I've never tried this, do CF tags work in CSS? > >Thanks for you time, > >Saturday > >ps: for those North Americans... <cfset myColour = "myColor"> ;) (it's >actually looks weird seeing it written as 'colour' nowadays). > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188662 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

