|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello -
I was wondering if there was a way to display colors as options on a select object (i.e.: <select name="color"> <option selected value=Red>Red</option> <option value="Blue">Blue</option> </select> ) , but instead of having the text "blue" show up, the color would show instead . . Any have any ideas? |
|
#2
|
|||
|
|||
|
Forgive me if I'm wrong, but you can create a color box by using CSS. Or you can create image files. Image would be a lot easier, I think, because you don't have to go through extra coding and can give people closest colors that you want to show them. Considering it's a <select> tag, there wouldn't be much space available, but you will be able to have an idea of the size of the image if you browse html you have now. Or... you can do something like gap.com does. Example URL: http://www.gap.com/asp/product_purc...908&wdid=203020 You can think of a lot of ways, but it all depends on what you sell or the colors are for. If you are selling products, it might be good idea to do something like gap. If the colors are for texts and backgrounds etc..., you probably want to create small images right next to the selection. If you have any more questions regarding to this, please reply this message.
![]() |
|
#3
|
|||
|
|||
|
I just try the following code and view it through IE5
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR> <form> <select name=color> <option value=red style='color:red'>red</font></option> <option value=blue style='color:blue'>blue</font></option> </select> </form> [/quote] |
|
#4
|
|||
|
|||
|
Instead of the text you could try to change the font to Symbol or Wingdings - choose a box-like character (example: n - Wingdings) and change the colour of that character to the appropriate colour.
You just have to hope most people have these fonts on their system - or you could embed them. Go to http://hotwired.lycos.com/webmonkey/design/fonts/ to find out about embedding fonts. |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Color options on Select object |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|