2

I know how to change the background color of a textarea, but what about changing the background color of the text that users type into a text area?

For example, in HTML you can change the background color of a span of text using span tags, ie:

<span style="background-color: blue">Words with blue background</span>

...But what about the text that users type into a text field?

I need to do this for a form that I'm creating, so that users can clearly see spaces and returns they're entering as well as the characters they enter.

Can it be done using CSS?

big picture
  • 301
  • 6
  • 14
  • 2
    Check this question: http://stackoverflow.com/questions/142527/highlight-text-inside-of-a-textarea – Heavy May 14 '13 at 03:25

1 Answers1

0

No.

But there is the other way around. Did you ever used editor in github.com? It's cool. It uses javascript and <div> to control the style of each line of code. And translate.google.com uses the same way.

LiuLang
  • 773
  • 4
  • 4