7 replies [Last post]
lizo
lizo's picture
Offline
Enthusiast
Leicester, England
Last seen: 11 years 30 weeks ago
Leicester, England
Joined: 2003-03-30
Posts: 51
Points: 0

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

http//www.colormixer.tk
http//www.colourmixer.tk

DJSdotcom
Offline
Enthusiast
Rochester, NY / Chicago, IL
Last seen: 11 years 31 weeks ago
Rochester, NY / Chicago, IL
Joined: 2003-03-23
Posts: 95
Points: 0

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

</twocents>

lizo
lizo's picture
Offline
Enthusiast
Leicester, England
Last seen: 11 years 30 weeks ago
Leicester, England
Joined: 2003-03-30
Posts: 51
Points: 0

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

http//www.colormixer.tk
http//www.colourmixer.tk

lizo
lizo's picture
Offline
Enthusiast
Leicester, England
Last seen: 11 years 30 weeks ago
Leicester, England
Joined: 2003-03-30
Posts: 51
Points: 0

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

http//www.colormixer.tk
http//www.colourmixer.tk

Sven
Sven's picture
Offline
Enthusiast
Brisbane, Australia
Last seen: 7 years 20 weeks ago
Brisbane, Australia
Timezone: GMT+10
Joined: 2003-03-12
Posts: 166
Points: 0

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.

lizo
lizo's picture
Offline
Enthusiast
Leicester, England
Last seen: 11 years 30 weeks ago
Leicester, England
Joined: 2003-03-30
Posts: 51
Points: 0

-

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

http//www.colormixer.tk
http//www.colourmixer.tk

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 21 hours 13 min ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5125
Points: 2722

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. Wink

lizo
lizo's picture
Offline
Enthusiast
Leicester, England
Last seen: 11 years 30 weeks ago
Leicester, England
Joined: 2003-03-30
Posts: 51
Points: 0

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.

http//www.colormixer.tk
http//www.colourmixer.tk