Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

change textcolor, background color in an option tag

<option selected value="0">Change Saved Value</option>

within the option tag
I want to set textcolor and background color
ASKER CERTIFIED SOLUTION
Avatar of dolomitedave
dolomitedave

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hagay Mandel
Use:

CSS:

<style type="text/css">
<!--

#form1 select {
      color: #33FF00;
      background-color: #0066FF;
}
</style>

HTML:

<form id="form1" name="form1" method="post" action="">
  <select name="my_select">
    <option value="0">aaa</option>
    <option value="1">bbb</option>
    <option value="2">ccc</option>
  </select>
</form>
Avatar of rgb192

ASKER

thanks