Connecting Tech Pros Worldwide Forums | Help | Site Map

activate different stylesheet

geotso
Guest
 
Posts: n/a
#1: Jul 20 '05
Hi

I'm looking for a script to activate a different stylesheet for a page,
according the link a visitor clicks on.

More specific, I have a page with a topic, divided into three sub-topics. I
also have a printer image to show a hidden layer (when a visitor clicks on
the image). Finally, I have three different stylesheets for media="print",
each one hiding the sub-topics -but one, and another one stylesheet showing
the whole document.

Well, I want to put four links in the layer to act like this:

link1: activate print1.css (shows sub-topic1 / hides the rest)
link2: activate print2.css (shows sub-topic2 / hides the rest)
link3: activate print3.css (shows sub-topic3 / hides the rest)
link4: activate printAll.css (shows all)

Is there a ready script for this?
(My knowledge in JavaScrip is extremely limited, and something similar I've
found at www.alistapart.com involves cookies, so I don't know how to take
them apart)

TIA
____________________________
geotso's stories
Be thou attentive!...

(Please, remove the TRAP to contact me)



JimMenees
Guest
 
Posts: n/a
#2: Jul 20 '05

re: activate different stylesheet


visit http://www.csszengarden.com/ which offers an interesting perspective on
applying stylesheets. The code there should help. (it applies various style
sheets to the same html code to create diff visual effects).
Closed Thread