PDA

Click to See Complete Forum and Search --> : CSS - class applies on click [resolved]


Acidic
Nov 4th, 2004, 02:29 PM
I would like to apply a certain class to an object only when the object has been clicked on. I know you can do:#Obj:hoverWhich will apply that part of CSS to the object when the mouse is hovering over the object. Is there an equivalent to when you've clicked the object or do I have to write JavaScript to do the trick?

vbNeo
Nov 5th, 2004, 03:48 AM
have you tried #Obj:active ?

Acidic
Nov 5th, 2004, 04:14 AM
That doesn't work exactly how I want it. But I've managed to make it in JavaScript now anyways. It's not quite a neat, but it works.
Thanks anyway.

edit: I'd never known about that action, thanks for pointing it out to me.