HighDots Forums  

select with colors

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss select with colors in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sjef
 
Posts: n/a

Default select with colors - 11-25-2008 , 04:48 AM






Hi, I want to create a select list in which every line has a different
color. Such as:
<option value="BurlyWood"
style="background-color:'#DEB887';">Burlywood</option>
<option value="CadetBlue"
style="background-color:'#5F9EA0';">CadetBlue</option>
<option value="Chartreuse"
style="background-color:'#7FFF00';">Chartreuse</option>
<option value="Chocolate"
style="background-color:'#D2691E';">Chocolate</option>
But this doesn't work. Any ideas how to do this? Is it possible anyway?



Reply With Quote
  #2  
Old   
Sjef
 
Posts: n/a

Default Re: select with colors - 11-25-2008 , 06:39 AM






OK, when I remove the single quotes it works.

"Sjef" <manuals-scripts (AT) planet (DOT) nl> schreef in bericht
news:492bc9d9$0$27235$ba620dc5 (AT) text (DOT) nova.planet.nl...
Quote:
Hi, I want to create a select list in which every line has a different
color. Such as:
option value="BurlyWood"
style="background-color:'#DEB887';">Burlywood</option
option value="CadetBlue"
style="background-color:'#5F9EA0';">CadetBlue</option
option value="Chartreuse"
style="background-color:'#7FFF00';">Chartreuse</option
option value="Chocolate"
style="background-color:'#D2691E';">Chocolate</option
But this doesn't work. Any ideas how to do this? Is it possible anyway?




Reply With Quote
  #3  
Old   
Nik Coughlin
 
Posts: n/a

Default Re: select with colors - 11-25-2008 , 02:37 PM



"Sjef" <manuals-scripts (AT) planet (DOT) nl> wrote

Quote:
OK, when I remove the single quotes it works.

"Sjef" <manuals-scripts (AT) planet (DOT) nl> schreef in bericht
news:492bc9d9$0$27235$ba620dc5 (AT) text (DOT) nova.planet.nl...
Hi, I want to create a select list in which every line has a different
color. Such as:
option value="BurlyWood"
style="background-color:'#DEB887';">Burlywood</option
option value="CadetBlue"
style="background-color:'#5F9EA0';">CadetBlue</option
option value="Chartreuse"
style="background-color:'#7FFF00';">Chartreuse</option
option value="Chocolate"
style="background-color:'#D2691E';">Chocolate</option
But this doesn't work. Any ideas how to do this? Is it possible anyway?
Allow me to recommend http://jigsaw.w3.org/css-validator/



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.