How to style the placeholder text for an input

Posted 2 years ago

input::-webkit-input-placeholder { color: white !important; }
 
input:-moz-placeholder { color: white !important; } /* Firefox 18- */

input::-moz-placeholder { color: white !important; }/* Firefox 19+ */
 
input:-ms-input-placeholder { color: white !important; }


You need to place it on individual lines as some browsers will recognised an invalid class call and scrap the rest of the class/css.