I have an image element that I want to change on click.
This works:
#btnLeft:hover {
width:7
You can use pseudo class :target
to mimic on click event, let me give you an example.
#something {
display: none;
}
#something:target {
display: block;
}
Show
Bingo!
Here's how it looks like: http://jsfiddle.net/TYhnb/
One thing to note, this is only limited to hyperlink, so if you need to use on other than hyperlink, such as a button, you might want to hack it a little bit, such as styling a hyperlink to look like a button.