Re: HTML select field where the OPTION text is of different colors [message #172778 is a reply to message #172777] |
Tue, 01 March 2011 00:23 |
Denis McMahon
Messages: 634 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 28/02/11 23:33, Captain Paralytic wrote:
>>> <select>
>>> <option>Black_text (yellow_text)</option>
>>> </select>
>> It's impossible. The only one thing that you can try is to emulate
>> select/options by javascript, but it's not easy
> It's impossible is it. I wish you'd told me that before I actually did
> it last year for a client of mine. Now I guess I'll have to tell them
> that they can't use it any more because it is now impossible!
OPs requirement is to have more than 1 colour of text in a single
option. Your solution applies a single colour to the whole of the option.
I would have thought span would work, but it seems it doesn't from the
OPs post, and my own testing confirms that span is not permitted within
option according to the validator, which means applying different styles
to parts of the option text is, at best, problematical
Rgds
Denis McMahon
|
|
|