PDA

Click to See Complete Forum and Search --> : a quick CSS question


sail3005
Feb 24th, 2001, 06:06 PM
In CSS, say i have something like this:



A.mylinks:hover{

properties
properties

}



How would i do something simular, but with mousedown?

like, for exapmle:



A.mylinks:MOUSEDOWN{

properties
properties

}

Feb 25th, 2001, 06:36 AM
that isn't possible..
"A" has only got three subheads..
:link
:visited
:hover

You cannot declare more... may be some scripting may help

Psyrus
Feb 25th, 2001, 03:08 PM
You could set a class for the onmousedown event and swap classes in the event through a script.

<style>

.pressed { color:red; }
.norm {color:yellow; }

</style>


<a HREF = "mypage.htm" CLASS = "norm" ONMOUSEDOWN = "this.className = 'pressed';">Click Me</a>