14

Possible Duplicate:
Change an input’s HTML5 placeholder color with CSS

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

0

1 Answer 1

8

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

1
  • 1
    Hey, would it be possible to group those selectors in a single line?
    – Darkmouse
    Commented Jan 19, 2015 at 3:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.