Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Style for Select 2

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
Anyone know how to apply style to a select... like colors and maybe an image for the pull-down arrow
 
not sure about the Image for the Drop down arrow but for background color use:

style="background-color:red"

<Select ID=SomeSel style=&quot;background-color:red&quot;>
</Select>
&quot;did you just say Minkey?, yes that's what I said.&quot;

MrGreed
 
Thanks, Xutopia

&quot;did you just say Minkey?, yes that's what I said.&quot;

MrGreed
 
You can also change the individual options by adding the same style=&quot;background-color:green&quot; or whatever into the option tag. Or use a class if you want to use the same colour for multiple options.
You'll have yourself a stripy select in no time then![bigsmile]
 
How about changing the text color? like if I have a dark background and want light text? and is there a way to apply color to the arrow?
 
Not sure about changing the arrow, but add color:yellow to your style and it will change the text colour to yellow.
e.g.
Code:
style=&quot;background-color:green;color:yellow&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top