CSS: Change text color upon click

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have a multiple choice quiz where I would like to use CSS to change the
color of the answers upon clicking them. I would like to present the right
and wrong answers up front, rather than direct the user to a separate page
with all correct answers.

Do the answers have to be "links" for this to work? They have to be inactive
links, because they don't actually go anywhere. They only serve the purpose
of changing color whether they're right or wrong.

There are four answers per question. Every answer will change a color when
clicked. The correct answer will turn green, and the incorrect one will turn
red. By the end of the quiz, most (if not all) choices will have probably
been clicked.

So, I'm trying to do two things, with a CSS class, if possible:
1) Prevent the clicked text link from trying to take me anywhere
2) Change the color of the text link

How do I do this? Any pointers are appreciated! :-)

Re: CSS: Change text color upon click

Yeah wrote:
Quoted text here. Click to load it

- posting in ciwas. Please look there for answers.


    -This space intentionally left blank.

Site Timeline