Good time of day!

Problem: in IE when textarea is disabled, if the background-color is not white, then the text is “highlighted” - a stroke occurs (? Or an attempt to smooth) the text.
On the computer, it doesn’t catch the eye, but on mobiles the font seems to be split apart ...

<!DOCTYPE html> <html> <head> <style> textarea:disabled { background-color: #1b2024; color:red; } </style> </head> <body> <textarea disabled="disabled">FKDJHKLHhhhhhhhhhhhhhfgjgj</textarea> </body> </html> 

Here you can see.

How to fix? You can, of course, make a div, or remove the disabled, and put a div on top, but I would like to remove this crap in IE through CSS ...

  • On stackoverflow, there was a similar question, there a person after hours of googling came to the conclusion that this crap in IE cannot be removed - rnd_d
  • I look at desktop IE11 and I do not see a problem ... What's wrong? - Qwertiy
  • @Qwertiy, well, you look at the date of the post, then IE10 hasn't really come out yet, and you write about IE11. And the problem was strongly manifested on mobile phones (WinPhone), as I don’t know how things are there now - we haven’t supported it for some time. - BOPOH
  • Oh .. The question was on the first page, I didn’t even look at the date ... - Qwertiy

2 answers 2

Yes, the browser is managing. different browsers display dimming in different ways, IE adds a shadow here.

IMHO, it will be easier to implement your item. For example, a div that you want to style as you like, if you need to redistribute, then replace it with a regular textarea ...

  • Something I stumbled, and you did not suggest - and why do I even have disabled? I’m ready to readonly - and this selection is not there ... But since the question was about disabled, and you answered it more fully, I will accept your answer) - BOPOH
  • Attributes with disabled attributes have one feature: Tip: Disabled <input> elements. If readonly is good enough, then you can use it. You're right. - Yura Ivanov
 :disabled { pointer-events: none; } 

Or it is better to use godlike.css right away to solve such problems.