psuedo classes

J

Jon Slaughter

I have some formating working where I want the user to click on a block and
have it hide/show another block.

The issue is that if I use active then it only hides it as long as the mouse
button is down and if I use link then it only displays it when its clicked.

I need a way to toggle the state from display to block(or back where it
was).

Is this at all possible with css? (else it makes it completely useless for
what I'm trying to do ;/) (which I guess ends up forcing me to use js ;/)


I got an idea to trick css into doing a toggle but want to make sure that
its the only thing left to try before I spend any time doing it.

Thanks,
Jon
 
J

Jon Slaughter

Jon Slaughter said:
I have some formating working where I want the user to click on a block and
have it hide/show another block.

The issue is that if I use active then it only hides it as long as the
mouse button is down and if I use link then it only displays it when its
clicked.

I need a way to toggle the state from display to block(or back where it
was).

Is this at all possible with css? (else it makes it completely useless for
what I'm trying to do ;/) (which I guess ends up forcing me to use js ;/)


I got an idea to trick css into doing a toggle but want to make sure that
its the only thing left to try before I spend any time doing it.

Thanks,
Jon

Again, to be clear, everything works when I use active except that the
effect I want only lasts while the user is holding down the button. I want
it do the effect when the user clicks the button and then "undo" it when he
clicks again.
 
B

Ben C

Again, to be clear, everything works when I use active except that the
effect I want only lasts while the user is holding down the button. I want
it do the effect when the user clicks the button and then "undo" it when he
clicks again.

You need to use JavaScript.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top