I have a case where I must write inline CSS code, and I want to apply a hover style on an anchor.
How can I use a:hover
in inline CSS inside the HTML st
You can get the same effect by changing your styles with JavaScript in the onMouseOver
and onMouseOut
parameters, although it's extremely inefficient if you need to change more than one element:
Also, I can't remember for sure if this
works in this context. You may have to switch it with document.getElementById('idForLink')
.