470,614 Members | 1,445 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,614 developers. It's quick & easy.

activate different stylesheet


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)

geotso's stories
Be thou attentive!...

(Please, remove the TRAP to contact me)
Jul 20 '05 #1
1 1749
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).
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Geoff Cox | last post: by
3 posts views Thread by Phil Thompson | last post: by
2 posts views Thread by pargat.singh | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.