I'm not sure that you're going in the right direction here. What do you mean by "on the fly"? I'd assume that you "on the fly" would mean that you'd be changing it in the browser and it'd take effect immediately. If so, it's JavaScript you need, not ASP code. Additionally, changing a CSS file will only have effect if it is changed in the server before the page information is sent to the browser. You also need to remember that a CSS file is a global server resource (unless you're going to create a separate one for each user), so changes to it would affect all users.
If you want to allow the user to tailor the look of his/her page for future visits to the page (or perhaps to a series of pages) - which isn't exactly "on the fly" - then you're going to need to store user configuration information somewhere (presumably in the database on the server) and include it in the html file sent to the browser. This information can certainly be included in a <style> area at the top of the html file if you like, or can simply be included in the actual html elements as they're generated. It's not a situation where a separate CSS file is going to help you. The actual generation of a style area, or of style information within HTML tags, is easy enough to write. The important thing is to get your browser html file correct first, then change it to allow ASP to generate the variable bits. Dave S ----- Original Message ----- From: Gary Broyhill To: [email protected] Sent: Wednesday, February 23, 2005 7:16 AM Subject: [ASP] CSS changing on the fly I'm looking for a way to control the color of various elements of a web page using an ASP script to change the CSS file on the fly. I'm thinking of incorporating it into then admin panel for a blog script that I'm using. Anyone know of some code for this? Thanks Gary Broyhill Webmaster www.lrc.edu [Non-text portions of this message have been removed] --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [email protected] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
