
Ever wondered how to set the style for the placeholder text using CSS? The code below shows you how you can do this for most major browsers. In the example below, the placeholder text color is set to black.
The Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
::-webkit-input-placeholder { color: black; } :-moz-placeholder { /* Firefox 18- */ color: black; } ::-moz-placeholder { /* Firefox 19+ */ color: black; } :-ms-input-placeholder { /* ie 10+ */ color: black; } |