I have just started to create a website and I want to have a HTML combo box with a list of different styles. The visitor can choose one from the list and press "Skin" or something like that, and the website will reload with the chosen CSS file. I have only seen this once before and thought it was a really good idea. I was wondering if it was going to be compicated to do or whether there is a simple script way of doing it.
Thanks
its easy!
If you go to http://www.alistapart.com/, Jeffrey Zeldman shows how to do it. The "technical name" for it is a style switcher, and a simple 15 line JavaScript snippet will do it for you!
-Mike
Thanks
Thanks for that,
That site looks as if it has a lot of useful info on it, I havent added the script yet but I understand it all so it shouldnt be a problem.
Thanks again
Problems
Hi again
After having a closer look at the script I think I may encounter some problems. My site uses frames and I think that script only updates the current page. Is there any way of sorting this out or will i need to remove the frames :?
Thanks
Try BrainJar.com
Try Mike Hall's effort at www.brainjar.com.
Hidden in the menu under Home -> Customise are options for display styles, and a link to a tutorial on how to implement the feature in your own site. I don't know if it will address the frame issues you mention, but let us know how you go.
-
Ive sorted out the script and got it all working but it doesnt work across frames or at least I dont know how to do it so....
Im gonna redo the site using tables, it shouldnt be to bad and I dont like the look of frames anyway.
Thanks for all your help
Switching between CSS files
Hi Lizo,
Why not try without tables.
You should be able to get the look you want using divs with css positioning.
We can always try to help you in your quest.
Switching between CSS files
Hi again,
I think im gonna stick to what I know which is HTML tables. Ive had a look at some sites that use CSS positioning and read a couple of tutorials and it looks a bit complicated. Also i havent got much time for site at the moment as my coursework deadlines are on friday :? and I need to get that done.