|
#1
|
|||
|
|||
|
Can Styleswitcher be used with just one button?
Hi everyone,
I've got the Styleswitcher on my photoblog, and at the moment it uses two buttons - one button to activate each of the two styles. However, I was thinking about streamlining and wondered if there would be a way of using CSS or something to make only one button necessary. That is: how would I tell the button to switch to the second style if it's currently using the first, and vice versa? |
|
#2
|
|||
|
|||
|
Never mind! Problem solved.
It hit me that all I needed to do was keep the two lines of code in the HTML that form the two buttons, and in the CSS remove the class for the light button in the 'light' stylesheet, and the class for the dark button from the 'dark' stylesheet. Now when the light stylesheet loads, the 'light' button doesn't appear - only the dark one! And vice versa...
|
| Post Reply |
| Thread Tools | |
|
|