View Full Version : alternate stylesheets


Engvalt
03-07-2003, 09:13 PM
hi...i run a site and i'm trying to make it so people can change my color scheme by switching to a different stylesheet....i know this can be done because www.albinoblacksheep.com uses the same idea. In fact it's where i got the idea from. anyways..... i only have 2 problems with it. 1)my site is in frames and it only affects the frame in which i have the image to switch. 2) i've loaded my 3 different stylesheets (1 of them is my "default" css) and it wont switch. here's my code:

THE FOLLOWING IS IN MY <HEAD> TAG

<link rel="stylesheet" type="text/css" href="site.css" title="bryan" />

<link rel="alternate stylesheet" type="text/css" href="inti.css"
title="inti" />

<link rel="alternate stylesheet" type="text/css" href="old.css" title="old" />

THE FOLLOWING IS IN MY <BODY> TAG

<a href="" onclick="setActiveStyleSheet('inti'); return false;"><img border="0" src="css.gif" width="16" height="16" alt="Inti's Color Scheme" /></a>

<a href="" onclick="setActiveStyleSheet('bryan'); return false;"><img border="0" src="css.gif" width="16" height="16" alt="My Color Scheme" /></a>

<a href="" onclick="setActiveStyleSheet('old'); return false;"><img border="0" src="css.gif" width="16" height="16" alt="Original" /></a>


****************************************
and here is my site so you can see exactly what i'm talking about..... http://arabianknights.cjb.net

lilchici13
03-10-2003, 09:23 PM
you have to use php i think read about it on www.php.net

Engvalt
03-15-2003, 04:02 PM
thanks for the info but i didn't help. would javascript work maybe?

Alcy
03-15-2003, 10:03 PM
This (http://www.alistapart.com/stories/alternate/) maybe?

Engvalt
03-15-2003, 10:08 PM
than kyou that helped tremedously