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

change textcolor, background color in an option tag

Posted on 2010-09-02
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
Question by:rgb192

Accepted Solution

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?
LVL 16

Expert Comment

ID: 33592248


<style type="text/css">

#form1 select {
      color: #33FF00;
      background-color: #0066FF;


<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>

Author Closing Comment

ID: 33601578

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
move widget title down 4 25
How to resize a div in html 3 37
Head to not include on scroll 4 23
removing a class in javascript 4 47
As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

856 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