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.

1

1 Answer 1

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; }
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.