Style the Element that has Focus in a Form - CSS Tricks
by Rekha[ Edit ] 2010-03-30 18:34:22
Style the Element that has Focus in a Form
A nice usability tip is to let people filling out a form know which input currently has focus. You can do this easily using the :focus pseudo-selector
input:focus { border: 2px solid green; }
This way your users will know exactly which field is ready for input