0

I want my input element had different colors for text and for caret.
I'm already found a solution for webkit browsers:

input {
    color: black;
    -webkit-text-fill-color: red;
}

But still, I wonder how can I make it for other browsers.

Eventually, I want to have transparent text color and black caret, if it matters.

Legotin
  • 2,378
  • 1
  • 18
  • 28
  • transparent text color ?? what is the point to hide text ? – G-Cyrillus Jun 08 '16 at 19:16
  • @GCyrillus your question doesn't help to solve the problem – Legotin Jun 08 '16 at 19:21
  • Possible duplicate of [http://stackoverflow.com/questions/7339333/styling-text-input-caret](http://stackoverflow.com/questions/7339333/styling-text-input-caret) – Rohit Jun 08 '16 at 19:22
  • @Rohit Not really. I'm already said that I found solution for webkit browsers. – Legotin Jun 08 '16 at 19:25
  • @legotin it could for a matter of accessibility and point you in some direction, as is , just looks useless, so why someone would bother to answer ? – G-Cyrillus Jun 08 '16 at 19:39
  • @GCyrillus I formulated the problem as it is. I don't see any sense to describe the task as whole: it does not help and may even confuse. I was hoping that if someone knows the answer he will help. I don't want to bother yoг if it seems useless to you – Legotin Jun 08 '16 at 21:38
  • 1
    I was actually curious of the purpose, anyway to do this would be to use a contenteditable tag, so pseudo and styling can be achieve. Javascritpt can also be part of it so carret always stands where you want and edit always starts where you want ... – G-Cyrillus Jun 08 '16 at 22:09
  • @GCyrillus thanks! – Legotin Jun 09 '16 at 12:57

0 Answers0