I think you also need a <cfcontent type="text/css"> tag in ther, but I'm not
sure...  

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 01, 2002 1:52 PM
To: CF-Talk
Subject: RE: Attaching CSS style sheet 


> If you are trying to dynamically assign a style sheet for
> each page, you could do the following:
> 
> <html>
> <head>
> <title>Title</title>
> <link rel="stylesheet" href="includes/css/styles.cfm" 
>       type="text/css">
> </head>
> <body>
> ..
> </body>
> </html>
> 
> Them, in your styles.cfm page, you could have:
> 
> <cfsetting enablecfoutputonly="yes">
> 
> <!--- --------------------------- --->
> <!--- PAGE: styles.cfm ---------- --->
> <!--- --------------------------- --->
> 
> <cfswitch expression="#CGI.SCRIPT_NAME#"> ...

In general, if you can avoid dynamically generating style sheets (just like
anything else), you'll get better performance, since the browser will cache
them, and won't have to refetch them. I'd recommend that you organize your
styles in such a way that you don't reuse style identifiers, or if you do,
you use the "cascading" part of the standard to override the styles attached
to certain identifiers.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to