I want to remove the dropdown arrow from a HTML <select>
element. For example:
<select style="width:30px;-webkit-appearance: none;">
<option>2000</option>
<option>2001</option>
<option>2002</option>
...
</select>
How to do it in Opera, Firefox and Internet Explorer?
there's a library called DropKick.js that replaces the normal select dropdowns with HTML/CSS so you can fully style and control them with javascript. http://dropkickjs.com/
The previously mentioned solutions work well with chrome but not on Firefox.
I found a Solution that works well both in Chrome and Firefox(not on IE). Add the following attributes to the CSS for your SELECTelement and adjust the margin-top to suit your needs.
Hope this helps :)
}
Try this :
JS Bin : http://jsbin.com/aniyu4/2/edit
If you use Internet Explorer :
Or you can use Choosen : http://harvesthq.github.io/chosen/
Try This:
HTML:
CSS:
Just wanted to complete the thread. To be very clear this does not works in IE9, however we can do it by little css trick.