0

The following CSS suppose to work but in FF (33.1.1) the select arrow is still displaying:

.select-style select {
    padding: 9px 8px 0 5px;
    width: 100%;
    border: none;
    font-size: 14px;
    box-shadow: none;
    background: transparent;
    background-image: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-indent: 0.01px;
    text-overflow: '';
}

http://jsfiddle.net/js25t1nx/1/

Aessandro
  • 5,517
  • 21
  • 66
  • 139

1 Answers1

1

1) Add a pseudo element for your custom arrow icon and position it to the right of the select element such that it overlays the default arrow.

2) Set pointer-events: none; on the pseudo element so that clicking on it doesn't hamper the drop down from opening.

DEMO

.select-style:after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    background: #fafafa url("http://icons.iconarchive.com/icons/iconsmind/outline/128/Triangle-ArrowDown-icon.png") no-repeat 98% 4px;
    background-size: 26px 26px;
    position: absolute;
    right: 0;
    top: 0;
    pointer-events: none; /* <-- */
}

.select-style {
  border: 1px solid #333;
  width: auto;
  height: 32px;
  overflow: hidden;
  position: relative;
  margin: 40px;
}
.select-style:after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 30px;
  background: #fafafa url("http://icons.iconarchive.com/icons/iconsmind/outline/128/Triangle-ArrowDown-icon.png") no-repeat 98% 4px;
  background-size: 26px 26px;
  position: absolute;
  right: 0;
  top: 0;
  pointer-events: none;
}
.select-style select {
  padding: 9px 8px 0 5px;
  width: 100%;
  border: none;
  font-size: 14px;
}
<div class="select-style">

  <select>
    <option value="volvo">Please select an option</option>
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
    <option value="mercedes">Mercedes</option>
    <option value="audi">Audi</option>
  </select>
Danield
  • 121,619
  • 37
  • 226
  • 255