1

I have a contact form and I would like to change the color of placeholder to white. I tried adding classes via CSS, but I have failed.

<input type="text" name="FullName" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required cnt_inp1" aria-required="true"   aria-invalid="false" placeholder="Full Name*">

If somebody could explain me and give me the solution, that would be great.

Thanks in advance.

m4n0
  • 29,823
  • 27
  • 76
  • 89
  • possible duplicate of [Change an input's HTML5 placeholder color with CSS](http://stackoverflow.com/questions/2610497/change-an-inputs-html5-placeholder-color-with-css) –  Jul 17 '15 at 00:08

1 Answers1

3

There are different CSS styles depending on the browser. This would do what you want in all major browsers (this would style all inputs, you can individualize them as well):

::-webkit-input-placeholder { color:#f00; }
::-moz-placeholder { color:#f00; } /* firefox */
:-ms-input-placeholder { color:#f00; } /* ie */
input:-moz-placeholder { color:#f00; }
m4n0
  • 29,823
  • 27
  • 76
  • 89
skrilled
  • 5,350
  • 2
  • 26
  • 48