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; }
Code language: CSS (css)

It was simple, I just added a focus

.contactformdiv input:hover, .contactformdiv textarea:hover, .contactformdiv input:focus, .contactformdiv textarea:focus { background-color:#fff; }
Code language: CSS (css)

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