Is there a way to change the background or button colors on HTML drop-down menus? (code below)?
<form>
<select name="">
<option name="1">textA</option>
<option name="2">textB</option>
<option name="3">textC</option>
Public Comments
- There sure is. You just need to use some CSS (Cascading Style Sheets). The short answer is that you can do something inline like this: <select name=""> <option name="1" style="background=red; color=white">textA</option> <option name="2" style="background=white; color=blue">textB</option> <option name="3" style="background=blue; color=red">textC</option> </select> "background=" changes the background color "color=" changes the text color Most likely though you'll want to put them in an external style sheet and link that into your HTML. It's a little more involved, but there's a tutorial in the source section that may help you out with that.
Powered by Yahoo! Answers