Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change placeholder color in css

<input name="email" type="text" id="email" size="30" value="" placeholder="EMAIL"/>
<input name="phone" type="text" id="phone" size="30" value="" placeholder="PHONE"/>

I have two form that have id = "email". First form placeholder color is white. Second is black.

But, i dont know how to make this without changing email id. The problem is my second form placeholder color is white. I cannot see this placeholder because the form background is white too.

input#email:-moz-placeholder{
  color:    #999 !important;
}

input#email:-ms-input-placeholder{
  color:    #999 !important;
}
like image 827
apisv2 Avatar asked Oct 27 '25 15:10

apisv2


1 Answers

Try this:

#your_form input#email::-webkit-input-placeholder {color:#999;}
#your_form input#email::-moz-placeholder          {color:#999;}
#your_form input#email:-moz-placeholder           {color:#999;}
#your_form input#email:-ms-input-placeholder      {color:#999;}
like image 180
Ihor Tkachuk Avatar answered Oct 29 '25 20:10

Ihor Tkachuk