Search code examples
csshtml-input

Background color in input and text fields


I would like to change the color background in the text and input fields of a form, but when I do this it also affects the submit button! Could it be done in some other way that does not affect the button?

I have used this code:

input, textarea {
  background-color: #d1d1d1;
}

Solution

  • input[type="text"], textarea {
    
      background-color : #d1d1d1; 
    
    }
    

    Edit: working example, http://jsfiddle.net/C5WxK/