• support@answerspoint.com

Change an input's HTML5 placeholder color with CSS

1531

Chrome supports the placeholder attribute on input[type=text] elements (others probably do too).

But the following CSS doesn't do diddly squat to the placeholder's value:

 

input[placeholder], [placeholder], *[placeholder] {
    color: red !important;
}
<input type="text" placeholder="Value">

Is there a way to change the color of the placeholder text?

I'm already using the jQuery placeholder plugin for the browsers that don't support the placeholder attribute natively.

  • CSS

  • asked 8 years ago
  • B Butts

0Answer


Your Answer

    Facebook Share        
       
  • asked 8 years ago
  • viewed 1531 times
  • active 8 years ago

Best Rated Questions