Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Display Colors in Drop Down

Reply
Thread Tools

Display Colors in Drop Down

 
 
scott
Guest
Posts: n/a
 
      05-30-2005
In a regular drop down form element like below, is there a way to display
associated colors with each option? Basically, I'd like it to look like
Outlook's Label Control drop down that displays a small color block with
each choice.

<select name="sTime"><option selected>--Select Category--
<OPTION value="WORK">Work Schedule</OPTION>
<OPTION value="Meeting">Meetings</OPTION>
<OPTION value="Other">Other</OPTION></select>


 
Reply With Quote
 
 
 
 
scott
Guest
Posts: n/a
 
      05-30-2005
Works great.


"Adrienne" <> wrote in message
news:Xns9666760D39021arbpenyahoocom@207.115.63.158 ...
> Gazing into my crystal ball I observed "scott" <>
> writing in news::
>
>> In a regular drop down form element like below, is there a way to
>> display associated colors with each option? Basically, I'd like it to
>> look like Outlook's Label Control drop down that displays a small color
>> block with each choice.
>>
>> <select name="sTime"><option selected>--Select Category--
>> <OPTION value="WORK">Work Schedule</OPTION>
>> <OPTION value="Meeting">Meetings</OPTION>
>> <OPTION value="Other">Other</OPTION></select>
>>
>>
>>

>
> Sure, just use a little CSS, eg:
> <option value="Work" style="background-color:yellow; color:green">Work
> Schedule</option>
> <option value="Meeting" style="background-color:blue; color:white">
> Meetings</option>
>
> You could also do:
> <option value="work" class="work">Work Schedule</option>
> and assign properties for the work class, .work {background-color:yellow;
> color:green}
>
> You might also want to look into the OPTGROUP element, which will group
> your elements and can also be styled.
>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Multiple select drop down poplulating sub drop down scott@dettcom.com Javascript 3 11-09-2006 07:50 PM
Auto Drop down a Drop Down List xxbmichae1@supergambler.com Javascript 5 11-23-2005 01:35 AM
New to .NET, can I have one drop down box control the data of another drop down box using a database? SirPoonga ASP .Net 2 01-07-2005 10:44 PM



Advertisments