Need more than hover?

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;
}

Tags:
0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments