I have an image element that I want to change on click.
This works:
#btnLeft:hover {
width:7
Edit: Answered before OP clarified what he wanted. The following is for an onclick similar to javascripts onclick, not the :active
pseudo class.
This can only be achieved with either Javascript or the Checkbox Hack
The checkbox hack essentially gets you to click on a label, that "checks" a checkbox, allowing you to style the label as you wish.
The demo