Solved

change textcolor, background color in an option tag

Posted on 2010-09-02
3
577 Views
Last Modified: 2012-08-14
<option selected value="0">Change Saved Value</option>

within the option tag
I want to set textcolor and background color
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
dolomitedave earned 500 total points
ID: 33591940

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

is this what your looking for?
0
 
LVL 16

Expert Comment

by:HagayMandel
ID: 33592248
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
 

Author Closing Comment

by:rgb192
ID: 33601578
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question