html - Is there a way to change the color of an HTML5 textbox watermark? -
this question has answer here:
- change html5 input's placeholder color css 23 answers
if have html5 text box follows
<form> <input type="text" name="mytextbox" placeholder"mytextbox"/> </form>
is there way using html or css change color of placeholder/watermark default light gray?
see this answer.
long story short, need use css selectors apply rules each browser, handles process differently.
input.mytextbox::-webkit-input-placeholder { /* webkit browsers */ color: red; } input.mytextbox:-moz-placeholder { /* mozilla firefox 4 18 */ color: red; opacity: 1; } input.mytextbox::-moz-placeholder { /* mozilla firefox 19+ */ color: red; opacity: 1; } input.mytextbox:-ms-input-placeholder { /* internet explorer 10+ */ color: red; }
<input class="mytextbox" type="text" name="mytextbox" placeholder="mytextbox"/>
Comments
Post a Comment