Style for placeholder input

html css

Style for placeholder input

How to styles for placeholder text in html ?

At here, I use input email have Id is “email”:

<input type="text" id="email" placeholder="Your Email" />

style placeholder

And to style for placeholder text of that input. Please use 4 line CSS as below:

input#email::-webkit-input-placeholder {color:red} //Chrome and Safari
input#email:-moz-placeholder {color:red} //Firefox
input#email::-moz-placeholder {color:red} //Firefox
input#email:-ms-input-placeholder {color:red} //IE



style placeholder
Thanks for watching!

2 thoughts on “Style for placeholder input

Comments are closed.