I am trying to style placeholder text, but I can't seem to select it. If my input is this:
<input id="search" class="search-query" placeholder="Placeholder text here" name="" value"">
How can I select the placeholder text in css for styling?
::-webkit-input-placeholder {
color: red;
}
:-moz-placeholder { /* Firefox 18- */
color: red;
}
::-moz-placeholder { /* Firefox 19+ */
color: red;
}
:-ms-input-placeholder {
color: red;
}
/* All modern browsers except IE and EDGE */
::placeholder { color: red }
Demo: http://jsfiddle.net/DLGFK/
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