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?

Improve company productivity with a Business Account.Sign Up

x
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.