0

I have a css that changes the font color of my placeholder in html. I am just wondering if it's possible to change the font color of as specific character in the placeholder.

I have this code right now:

::-webkit-input-placeholder {
    color:    #136a7e;
}
::-webkit-textarea-placeholder {
    color:    #136a7e;
}
:-moz-placeholder {
    color:    #136a7e;
}
::-moz-placeholder {
    color:    #136a7e;
}
:-ms-input-placeholder {
    color:    #136a7e;
}
:-ms-textarea-placeholder {
    color:    #136a7e;
}

#name::-webkit-input-placeholder, #email::-webkit-input-placeholder,
#email::-webkit-input-placeholder, #question::-webkit-input-placeholder,
#mobile::-webkit-input-placeholder
{
  color:    #136a7e;
}

So this code will give a color 136a7e to my placeholder text. What if I want a specific character to be red, example, '*' should be red?

jackhammer013
  • 2,295
  • 11
  • 45
  • 95
  • No, this is not possible. – Paulie_D Jun 15 '16 at 06:38
  • You can not change a color of a specific chat in CSS, besides the first char and that can be done with the `::first-letter` Selector (see link http://www.w3schools.com/cssref/sel_firstletter.asp) and i am not sure it will work on a placeholder – Roysh Jun 15 '16 at 06:38

0 Answers0