Pedro Santana
Pedro Santana

Reputation: 31

Input Placeholder Text Color

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.

Upvotes: 1

Views: 189

Answers (1)

skrilled
skrilled

Reputation: 5371

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

Upvotes: 3

Related Questions