0

I've found this article Change an HTML5 input's placeholder color with CSS which is extremely relevant and hence quoting it here.

Now, I unlike most the given articles I now know how to style the text inside but I dont know how to make it completely customizable. For instance, I would like to high a particular part of my placeholder to be of blue and the rest to be red. Here is an example that I try to illustrate my point.

Had it been a normal text I can just add some classes as per my choice. But in this case, what is the workaround for it?

http://jsfiddle.net/johnjacob/018fabmu/

Community
  • 1
  • 1
  • 1
    I don't think the answers in the question that this question was marked as duplicate as are good. Since you tagged the question with JavaScript and jquery, you might want to look at this jquery plugin: http://fuelyourcoding.com/scripts/infield/ It uses the ` – Cave Johnson Jun 25 '16 at 17:48
  • Thanks for this. IS there any beter alternative? –  Jun 25 '16 at 18:01
  • IMO this is the best jquery-based solution and there is no possible way to do it with CSS alone. – Cave Johnson Jun 25 '16 at 18:36

0 Answers0