12

From what I saw, in Firefox and Chrome, the color of the text cursor in an input field changes to the value of the color css property. However in IE it has no effect whatsoever.

Is there any way to achieve this effect in IE?

General Grievance
  • 4,555
  • 31
  • 31
  • 45
krulik
  • 976
  • 1
  • 10
  • 31
  • Same problem on my page (http://www.lonniebest.com/FormatCSS). When you hover the cursor in the textarea, it blends in with the background. Annoying; it should act as you say above: be what ever color the "color" property is. – Lonnie Best Feb 26 '10 at 08:50
  • @Lonnie: How can you hover the caret? – Joey Nov 21 '10 at 01:49
  • @Joey your answer is valid. Still whats the overcome for this? –  Aug 29 '12 at 08:59

1 Answers1

20

The color of the text cursor in an input on IE is always the inverse of the background color. So you can't on IE.

This is also unspecced by W3C so don't expect support to be anywhere, if there is, then it's merely an artifact :-)

Edit: 9-years later and we now have caret-color, but not for IE or Edge. Works on other browsers.

Samuel Neff
  • 73,278
  • 17
  • 138
  • 182
Joey
  • 344,408
  • 85
  • 689
  • 683
  • 1
    This is still not implemented, but there is now a spec for this: http://dev.w3.org/csswg/css-ui/#caret-color – Florian Rivoal May 05 '15 at 12:30
  • Since IE Edge v79 (Jan 2020) we are able to use the CSS rule _caret-color_ – mryuso92 Mar 03 '20 at 20:37
  • @mryuso92: Well, that's the Chromium-based Edge, so neither Trident, nor EdgeHTML ever gained support for this. Which was what this question was about. – Joey Mar 04 '20 at 07:45