Wednesday, 4 October 2017

css - Style text input placeholder











Is there anyway to style the color of a placeholder in a text input? Right now I'm stuck with the boring default grey.


Answer



You sure can http://css-tricks.com/snippets/css/style-placeholder-text/.



(from the above article)



::-webkit-input-placeholder {
color: red;
}


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

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

:-ms-input-placeholder {

color: red;
}


Or check MDN https://developer.mozilla.org/en-US/docs/CSS/:-moz-placeholder


No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...