The user determines the Site

G

George Hester

My site is all one color basically. But I'd like to give the user the ability to make the site a color of their choice. I have it set up so that they can choose the color of the logon page and save that to favorites if they want. This basically uses a Internet Explorer propietary function.

Anyway after they save the logon page to favorites\bookmark in the color of their choice, I'd like to make the rest of the site that color. I'm thinking a cookie? Or maybe use JavaScript to write to a cookie and use that to determine the CSS I'll use for the bgcolor attribute of the <BODY>. Any suggestions how to accomplish this? Thanks.
 
B

Brynn

What I did, is created a different CSS file for each color ... and
then dynamically write the line to link the right CSS file.

check it out ... www.coolpier.com and www.hotpier.com are the same
site in the same web directory ... click the little button in the
upper right hand corner to toggle between them.

granted, I have some images dynamically written as well, but anyway

some ASP code you could use would look similar to this ...

<%
Select Case Request.QuerySting("siteColor")
Case "blue", "red", "green"
theColor = Request.QuerySting("siteColor")
Case Else '// default purple
theColor = "purple"
End Select
%>

<link rel="stylesheet" type="text/css" href="/cp/_main/stylesheets/<%
=theColor %>_yourstyle.css">

Brynn
www.coolpier.com
 
G

George Hester

Well I only want the one line in the CSS:

body {bgcolor: color;}

That's a lot of CSS files about 160 in all. There has to be a better way. But I'll look through that. Thx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top