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
LVL 1
rgb192Asked:
Who is Participating?
 
dolomitedaveConnect With a Mentor Commented:

<option style="background-color:#FFFF00" style="color:#FF0000" selected value="0">Change Saved Value</option>

is this what your looking for?
0
 
HagayMandelCommented:
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>
0
 
rgb192Author Commented:
thanks
0
All Courses

From novice to tech pro — start learning today.