Log in

View Full Version : Styleswitcher.css



ReadyToLearn
03-28-2008, 06:26 PM
Hello,

I'm using the CSS switching script that I found at A List Apart (http://www.alistapart.com/stories/alternate/).

It works great for it's purposes. But what I'd like to do is to only show a link when it's useful.

I have two alternate stylesheets that I'm switching from (large.css and normal.css). When large.css is set, I'd like to show a link to normal and when normal.css is set, I'd like to show a link to large.

Is there any way I can add this functionality to the style switcher script.

Or does anyone know of a css switching script that has this kind of toggling functionality.

Medyman
03-28-2008, 06:36 PM
Maybe I'm missing the point, but why not just add statements in the CSS.

Set unique ids around your links.

For example,


<a href="large.css" id="large">LINK</a>
<a href="normal.css" id="normal">LINK</a>

Then in your css, set the opposite one to display:none

Would that work?

ReadyToLearn
03-28-2008, 07:20 PM
As usual, absolutely brilliant Medyman!

Thank you so much.

It's so simple. I can't believe I didn't think of it myself