We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

will on 03/25/08


Tagged

form css input highlight textarea


Versions (?)


Who likes this?

3 people have marked this snippet as a favorite

blackabee
asturi
monapdx


Highlight active form fields


Published in: CSS 


Makes the form field background yellow and the border red when it is the active field. Works in most browsers except the usual lame ones (IE5.5 & 6).

  1. textarea:focus, input:focus {
  2. border: 1px solid #900;
  3. background-color: #FFFF9D;
  4. }

Report this snippet 

You need to login to post a comment.