Unfortunately it is still not possible to do this in the "right way" on all browsers, since the property appearance
is not ubiquitous.
Support from current browsers:
For now, it’s important to maintain a fallback, but you can increase support by also adding the prefix -moz
.
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
Some developers include the tag select
within a div
and stylize it, as in the example:
<div class="select">
<select>
...
</select>
</div>
select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 100%;
}
.select {
...
background: #e9e9e9 url('../imagens/bgs/seta.png') 95.5% 50% no-repeat;
...
}
This method may increase compatibility, although it is not yet a solution cross-browser.
Or, use a Javascript library like Select2.
Interesting, I didn’t know it. But from what I saw in MDN, it seems that this property was cut from the draft specification, so it will hardly be cross-browser one day.
– bfavaretto
@bfavaretto: You are right, this specification is known as System Appearance and was proposed in the CSSS3-UI Candidate Recommendation on 11/05/2004, but never got off the ground. It is very unlikely that the property
appearance
be present at CSS4-UI As we know it today, the reality is that ten years have passed, many components (mainly forms) have been added to HTML5 and this makes clear the need for the rewinding and rewriting of the problems that were originally designed to solve.– Caio Tarifa