Form background color

This might not be a CSS question. I’m not sure.

But you know how on some sites, the background color of a form changes color when you’re writing in it? How do they do that? I’ve been trying to figure that out for a long time.

I’ve done stuff like:

input:hover {
background: #hex;
}

But that’s not the right way to do it. Any pointers?

Thanks guys.

Your welcome. :slight_smile:

input:focus should do it.

Wow that did it. Incredibly simple, I’ve just never known the attribute.

Thanks.