DirtDawg
March 2nd, 2007, 03:00 AM
I'm attempting to make a "toy" website that is written entirely in css+html. Nothing else. No Flash, no Javascript.
I would like to include small areas, or buttons, which the user can click to effect other areas on the page. For example, lets suppose there's a button underneath a picture of a smiley face :) . Now suppose when the user presses the button, the picture changes to a sad face :( . Another click would revert the image back to its original position :) .
I have managed to (mostly) work out a remote rollover system that will allow the button to change the image on either hover or active states. What would really be great is if I could keep the changes permanent after the fact, like an on/off switch. Of course, without Javascript, variables are not possible so this idea might be dead in the water.
But I have this idea to use the :visited psuedo-class as a primative variable. I think it could work, but the switch would only function one time until the user dumped their cache. Unless there is some way to erase or reverse that specific attribute?
Is this even possible? Any and all ideas would be greatly appreciated.
Thanks for your opinions.
UPDATE: I finished this project months ago and forgot to post it here! Check out my Spaceship Of Sweetness (http://www.weeklyhilarity.com/spaceship_of_sweetness/) if you're interested. By the way, as a result of this problem never getting solved, the only way to turn off the coffee pot is to erase that page from your browser history! Not even the future is perfect.
I would like to include small areas, or buttons, which the user can click to effect other areas on the page. For example, lets suppose there's a button underneath a picture of a smiley face :) . Now suppose when the user presses the button, the picture changes to a sad face :( . Another click would revert the image back to its original position :) .
I have managed to (mostly) work out a remote rollover system that will allow the button to change the image on either hover or active states. What would really be great is if I could keep the changes permanent after the fact, like an on/off switch. Of course, without Javascript, variables are not possible so this idea might be dead in the water.
But I have this idea to use the :visited psuedo-class as a primative variable. I think it could work, but the switch would only function one time until the user dumped their cache. Unless there is some way to erase or reverse that specific attribute?
Is this even possible? Any and all ideas would be greatly appreciated.
Thanks for your opinions.
UPDATE: I finished this project months ago and forgot to post it here! Check out my Spaceship Of Sweetness (http://www.weeklyhilarity.com/spaceship_of_sweetness/) if you're interested. By the way, as a result of this problem never getting solved, the only way to turn off the coffee pot is to erase that page from your browser history! Not even the future is perfect.