stylesheet for combo box

Hi All,
I have one combobox in my form.
The contents are displayed in the following manner in the combobox :

Test1   (AAAAA)   -- 11111
Test2   (BBBBBB)   -- 22222
Test3   (CCCCCC)   -- 333333
Test4   (DDDDDD)   -- 444444
Test5   (EEEEEE)   -- 555555

..... so on

I want to display Test1, Test2, Test3... in different colors...Similarly "AAAAAA", "BBBBBB", "CCCCCC" different color...and "11111", "222222" different color...

Thanks in advance...
Meenakshi Dhar
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Each item will have to be one color.

All of: Test1   (AAAAA)   -- 11111 can be red
All of: Test2   (BBBBBB)   -- 22222 can be blue

But you can't do: Test1(in red) (AAAAAA)in blue --111111(in green)

To change the item color you just add a color style to <option>

<option value="blah" style="color: #cccccc">blah</option>


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MeenakshiDharAuthor Commented:
Ok is it not possible at all?? I mean any other way to do it.....
sam is right, you can only change the color of options tags.
No way to put two different colors in a single option tag.
If you really want to do so, you will have to make your own custom combo-like control with JavaScript/CSS.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

if you fill your data from database and your page is for instance asp  you could do like this , and define array of colors and set it for each data which you read from database instead of fixed color which I used in below (  "color:black"   )
"color:" & arr(1)

<select size="19" class="MT" name="D1"  style="border: 0px solid #285007; padding: 0; background-color: #EEEEEE; scrollbar-highlight-color:#00ff00; scrollbar-base-color:green ; font-weight:bold" >

          while NOT RS.EOF%><option
          Response.write "yourvalue"))
then it means you could only have one color for each option as others told u
MeenakshiDharAuthor Commented:
yes.. sara110 is right...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.