I have an image element that I want to change on click.
This works:
#btnLeft:hover {
width:7
I had a problem with an element which had to be colored RED on hover and be BLUE on click while being hovered. To achieve this with css you need for example:
h1:hover { color: red; }
h1:active { color: blue; }
This is a heading.
I struggled for some time until I discovered that the order of CSS selectors was the problem I was having. The problem was that I switched the places and the active selector was not working. Then I found out that :hover
to go first and then :active
.