30

Please look this example:

select {
  width: 172px;
  height: 22px;
  padding: 2px 7px;
  border: none;
  background: url(http://imgur.com/MJyZM.png) 0 0 no-repeat;
}
<select>
  <option value="abcdefg">abcdefg</option>
  <option value="1234567">1234567</option>
  <option value="abcdefg">abcdefg</option>
</select>

https://jsfiddle.net/jeafgilbert/wz0zaev0/

Can someone please update it to be transparent in Chrome? Currently the result in FF is the correct one. Thanks.

Update:

Now without -webkit-appearance: none; works fine in Chrome.

Nemus
  • 3,879
  • 12
  • 38
  • 57
Jeaf Gilbert
  • 11,495
  • 19
  • 78
  • 105

1 Answers1

57

select {
  width:192px;
  padding:2px;
  border:none;
  background:url(http://imgur.com/MJyZM.png) 0 0 no-repeat;
  -webkit-appearance: none;
}
<select>
  <option value="abcdefg">abcdefg</option>
  <option value="1234567">1234567</option>
  <option value="abcdefg">abcdefg</option>
</select>

Not tested on firefox but it seems -webkit-appearance: none; disables specific behaviours webkit can apply.

benshabatnoam
  • 7,161
  • 1
  • 31
  • 52
MatTheCat
  • 18,071
  • 6
  • 54
  • 69