Possible Duplicate:
Change an input’s HTML5 placeholder color with CSS
Is there anyway to style the color of a placeholder in a text input? Right now I'm stuck with the boring default grey.
Definition and Usage. The ::placeholder selector selects form elements with placeholder text, and let you style the placeholder text. The placeholder text is set with the placeholder attribute, which specifies a hint that describes the expected value of an input field.
In most browsers, the placeholder text is grey. To change this, style the placeholder with the non-standard ::placeholder selector.
Change Input Placeholder Text with CSS You can use the ::placeholder pseudo-element to change the styles of the placeholder text, which includes the ability to change the background. The code in this example uses a Sass function to generate code for support in older browsers as well.
You sure can http://css-tricks.com/snippets/css/style-placeholder-text/.
(from the above article)
::-webkit-input-placeholder {
color: red;
}
:-moz-placeholder { /* Firefox 18- */
color: red;
}
::-moz-placeholder { /* Firefox 19+ */
color: red;
}
:-ms-input-placeholder {
color: red;
}
Or check MDN https://developer.mozilla.org/en-US/docs/CSS/:-moz-placeholder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With