ItsWesYo Posted August 1, 2006 Share Posted August 1, 2006 I was wondering on how you would make different themes for your site.Example: A person happens to see your site and wants to view it in a different color. Is there a way I can do that using cookies or something? Quote Link to comment Share on other sites More sharing options...
onlyican Posted August 1, 2006 Share Posted August 1, 2006 I have seen this done many ways, the best way is to have 2 CSS and a linkDesign A / Design Bon click, you can either store in cookiesor record IP (Can be heavy on server)or use the GET methodmywebsite.com/index.php?design=b Quote Link to comment Share on other sites More sharing options...
ronverdonk Posted August 1, 2006 Share Posted August 1, 2006 You make as many CSS files as you want styles. Make a select box on your screen, user selects the style and a JavaScript program loads the CSS file to use. That is basically it. I use it for selecting font sizes fot the visually impaired users.Ronald ;D Quote Link to comment Share on other sites More sharing options...
ItsWesYo Posted August 1, 2006 Author Share Posted August 1, 2006 Ronald, would you be able to help me with the javascript and such? Quote Link to comment Share on other sites More sharing options...
ronverdonk Posted August 1, 2006 Share Posted August 1, 2006 Actually I am using the FREE Style Sheet Switch v1.0 package from dynamic drive. The link to the package is [url=http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm]http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm[/url]It uses cookies to save the choice of the user. I have implemented it some time ago and it works fine.If you still need help, drop me a message.Ronald ;D Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted August 1, 2006 Share Posted August 1, 2006 or you can save the choice in the database and load it on runtime too[code]<link src="/css/design<?php echo $designNo ?>.css">[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.