Yep Seona, that's it. You *might* get away without that header, but it's there to make it technically correct, and make sure that your browser doesn't freak out, because otherwise PHP will make the content appear (according to the header) as text/html format I think.
Give it a go with CF if you like, just leave out the header and see what happens - just make sure you have the type="text/css" in the LINK - that might be enough to force the content type. You'll want to check that in all browsers to make sure they all eat it tho :) Beau -- Beau Lebens Information Architect [EMAIL PROTECTED] Dented Reality - www.dentedreality.com.au Information Architecture, Usability, Web Development Seona Bellamy said: > > Just to make sure I understand you, Beau, the php code you show is the > content of that cssmaker.php that you put in the href? > > Not sure if I can duplicate that with CF - it's that "header" bit that is > the biggest problem I guess. Does anyone know if there's a similar function > in CF? > > Thanks, > > Seona. > > -----Original Message----- > From: Beau [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 10 March 2004 3:38 PM > To: [EMAIL PROTECTED] > Subject: Re: [WSG] Dynamically populating stylesheets? > > > > You can do this with something like PHP, just a script that does something > like this > > <link rel="stylesheet" type="text/css" href="cssmaker.php" /> > > <?php > header('Content-type: text/css'); > > echo 'H1 { font-family: Arial; } > // etc! > > ?> > > obviously, once you have something like that running, you can just change it > so that the echo line pulls content from a database, then dumps it out, > pretending to be a stylesheet :) > > HTH > > Beau > > -- > Beau Lebens > Information Architect > [EMAIL PROTECTED] > Dented Reality - www.dentedreality.com.au > Information Architecture, Usability, Web Development > > Seona Bellamy said: >> >> Hi guys, >> >> Is this even possible? What I have is a site that gives people a chance to >> set up their own information sections where they can record their own >> content. I would like that an account holder can state which colours, font >> sizes, font styles, etc they want for their section and have this >> information gets recorded in a database. That's the easy bit, and I can do >> that no problem. What I need then if that when a user navigates to a >> particular section, the system pulls these values from the database and >> populates the stylesheet with them so that the section displays in the >> requested colours and styles. >> >> If it makes any difference, I'm working in ColdFusion. >> >> Of course, if this is just a pipe dream then I'll just have to sit down > and >> figure out another way around the problem. Id really prefer not to have to >> use the selection form as a way for account holders to email me their >> preferences so I can make them a new stylesheet if I can help it... :) >> >> Cheers, >> >> Seona. >> --- >> Outgoing mail is certified Virus Free. >> Checked by AVG anti-virus system (http://www.grisoft.com). >> Version: 6.0.605 / Virus Database: 385 - Release Date: 1/03/2004 >> >> ***************************************************** >> The discussion list for http://webstandardsgroup.org/ >> ***************************************************** >> >> > > ***************************************************** > The discussion list for http://webstandardsgroup.org/ > ***************************************************** > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.605 / Virus Database: 385 - Release Date: 1/03/2004 > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.605 / Virus Database: 385 - Release Date: 1/03/2004 > > ***************************************************** > The discussion list for http://webstandardsgroup.org/ > ***************************************************** > > ***************************************************** The discussion list for http://webstandardsgroup.org/ *****************************************************
