Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Background colour of Drop down list entry's?

Reply
Thread Tools

Background colour of Drop down list entry's?

 
 
harry
Guest
Posts: n/a
 
      05-31-2004
A client wants a drop down box on a web page that contains 3 list items
"red", "green" & "amber" - is it possible to set the background colour for
each individual item? - any ideas before I tell them no?

cheers

harry


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      05-31-2004
harry wrote:

> A client wants a drop down box on a web page that contains 3 list items
> "red", "green" & "amber" - is it possible to set the background colour for
> each individual item?


option.someClass { background-color: #aff; color: #ffa; }

- browser support is limited.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      05-31-2004

"harry" <> wrote in message
news8Duc.46$...
> A client wants a drop down box on a web page that contains 3 list items
> "red", "green" & "amber" - is it possible to set the background colour for
> each individual item? - any ideas before I tell them no?


Tell him no.

Cheers
Richard.


 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      05-31-2004
in post: <news8Duc.46$>
harry <> said:

> A client wants a drop down box on a web page that contains 3 list items
> "red", "green" & "amber" - is it possible to set the background colour for
> each individual item? - any ideas before I tell them no?


#o1{background:red;}
#o2{background:green;}
#o3{background:#FFEA76;}

<option id="o1">blah 1</option>
<option id="o2">blah 2</option>
<option id="o3">blah 3</option>

etc etc

browser support varies. user options may also disallow styling of form
elements.


--
b r u c i e


 
Reply With Quote
 
harry
Guest
Posts: n/a
 
      05-31-2004
thanks chaps, works perfectly!

"David Dorward" <> wrote in message
news:c9ev63$q46$2$...
> harry wrote:
>
> > A client wants a drop down box on a web page that contains 3 list items
> > "red", "green" & "amber" - is it possible to set the background colour

for
> > each individual item?

>
> option.someClass { background-color: #aff; color: #ffa; }
>
> - browser support is limited.
>
> --
> David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
> Home is where the ~/.bashrc is



 
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
What is the point of having 16 bit colour if a computer monitor can only display 8 bit colour? How do you edit 16 bit colour when you can only see 8 bit? Scotius Digital Photography 6 07-13-2010 03:33 AM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 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
changing a background image to a background colour? Dj Frenzy Javascript 3 02-10-2004 08:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57