PDA

View Full Version : Partial input text coloring


scasti1
09-21-2009, 12:26 AM
Is there a way to partially color text already in an input field. I don't think there is as I believe you can only change the color style for the entire text. I would like to be able to partially change the color:

testing-this

for instance, "testing-" would be black and "this" would be red to let the user know that this same coloring would show up later upon printing. I really don't want to take up more real estate to indicate this in some other fashion, and it wouldn't be obvious anyway.

Thanks if anybody has any ideas.

Scott

tadster
09-21-2009, 03:20 PM
instead of a input field, you could use a div, with a background of a black and red image, and make its content editable via javascript, the user would then be able to type into it, it would already have the colors.