Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

change partial text color in option tag

 
ram deal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do I change the only part of the text in the following select list
i.e

change text color 'boy is blue' to blue
and
change text color 'girl is pink' to pink

<select name="test">
<option>boy is blue girl is pink</option>
</select>
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65227
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not possible.
[ April 30, 2008: Message edited by: Bear Bibeault ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually it is possible to add a classname or a style to the option tag, but it is not able to change the text inside of it to be different.

This is a very old article on doing it: http://www.netmechanic.com/news/vol4/design_no19.htm

Eric
[ April 30, 2008: Message edited by: Eric Pascarello ]
 
ram deal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for the response.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic