Apply Style for Placeholder Text in CSS

by Sasikumar 2013-11-18 15:31:01

We can use the following code to set style for the placeholder text present in input, textarea, etc.
::-webkit-input-placeholder { color: red; } /* Chrome */

:-moz-placeholder { color: red; } /* Firefox 18- */

::-moz-placeholder { color: red; } /* Firefox 19+ */

:-ms-input-placeholder { color: red; } /* Internet Explorer */


If only needed for a particular tag like input alone, use following format
input::-webkit-input-placeholder { color: red; } /* Chrome */

input:-moz-placeholder { color: red; } /* Firefox 18- */

input::-moz-placeholder { color: red; } /* Firefox 19+ */

input:-ms-input-placeholder { color: red; } /* Internet Explorer */
995
like
0
dislike
0
mail
flag

You must LOGIN to add comments