question on combo box text color

D

DomIntCom - Info

how do I change the text color in a combo box? I have looked everywhere for
this info, and seem to be able to change it everywhere except in the combo
box.

thanks,

Jeff
 
B

brucie

in post: <
DomIntCom - Info said:
how do I change the text color in a combo box? I have looked everywhere for
this info, and seem to be able to change it everywhere except in the combo
box.

browser support for styling form elements varies.

select,option{color:white;background:red;}
 
D

David Dorward

DomIntCom said:
how do I change the text color in a combo box?

A combobox? In a HTML? Very unlikely. You probably mean a select element[1].

The answer is - the same as anywhere else: With the CSS color and
background-color properties. Browser support is, however, limited due to
the techniques used to render drop down menus.

[1] Select elements are usually rendered as drop down lists. A combobox is a
drop down list combined with a text box, this allows the user to pick an
existing option or type in a new one. HTML makes no provision for this, so
any that are around are strictly non-standard JavaScript hackery[2].

[2] And I think I might have figured out a way to make one that is actually
accessible - I'll see about writing it up later.
 
D

DomIntCom - Info

thnx...

I'll play with this, I'm assuming I can change the color with a hex value
(which is what I need).

should be able to make it work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top