I had a hover effect on an html input element but also needed to have an active state.
The css was like this for the inputs in mention:
.contactformdiv input:hover, .contactformdiv textarea:hover {
background-color:#fff;
}
It was simple, I just added a focus…
.contactformdiv input:hover, .contactformdiv textarea:hover, .contactformdiv input:focus, .contactformdiv textarea:focus {
background-color:#fff;
}