...

View Full Version : Styled select element of a form



Oscar34
05-28-2012, 04:10 PM
Would be grateful if anyone tell me a js and css code to make a select element on a form that select element has rounded cornered borders and its background has different color and its drop down list background and borders has different colors and also the arrow of this select element is an image arrow. Cheers.

Philip M
05-28-2012, 05:49 PM
Most browsers doesn't support customizing of select elements or options using css.

This will customise the color/bgcolor of a select list:-


<select id = "fruits">
<option value = "0" selected>Select a fruit......</option>
<option value = "1" style="background-color: teal; color: yellow;"> Apple<br>
<option value = "2" style="background-color: lightgreen; color: green;"> Pear<br>
<option value = "3" style="background-color: red; color: white;"> Peach<br>
</select>

AFAIK that is the best you can do.

Quizmaster: The Italian company Gaggia manufactures machines for making what drink?
Contestant: Whisky.

VIPStephan
05-28-2012, 07:30 PM
Would be grateful if anyone tell me a js and css code to make a select element on a form that select element has rounded cornered borders and its background has different color and its drop down list background and borders has different colors and also the arrow of this select element is an image arrow. Cheers.

Punctuation isnít quite your strength, is it?
I interpret this and they way you are essentially demanding for something to be provided for you as ignorance of the simplest rules of respect and therefore decide to ignore your request in return.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum