Solved

change textcolor, background color in an option tag

Posted on 2010-09-02
3
564 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
3 Comments
 
LVL 1

Accepted Solution

by:
dolomitedave earned 500 total points
Comment Utility

<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
Comment Utility
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
Comment Utility
thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now