I'm trying create a custom drop down control and I need to hide the arrows from the native controls. I'm using the following CSS
, which is working for Chrome and Safari, but not in Mozilla and IE.
select.desktopDropDown { appearance: none; -moz-appearance:none; /* Firefox */ -webkit-appearance:none; /* Safari and Chrome */ }
Here is a [jsfiddle][1].
Hint: The abbreviation i.e. is short for the Latin phrase id est, meaning "that is." -ie. noun suffix.
Only use these abbreviated forms e.g. and i.e. in more informal or expedient documents. It is always correct to simply write out, "for example," or "that is." Since these are abbreviations, they do require a period after each letter.
The abbreviation "i.e." should always appear after the first section of the sentence, in the middle, so it is grammatically correct. For example, the sentence, "I.e. he likes super heroes" or the sentence, "He likes super heroes, i.e." are incorrect.
Use this it will work but with IE10+ and for FF :
Your css should look like this:
select.desktopDropDown::-ms-expand { display: none; }
More about ::ms-expand
.
Then for the rest :
select.desktopDropDown { outline : none; overflow : hidden; text-indent : 0.01px; text-overflow : ''; background : url("../img/assets/arrow.png") no-repeat right #666; -webkit-appearance: none; -moz-appearance: none; -ms-appearance: none; -o-appearance: none; appearance: none; }
Note: I hardcoded path "../img/assets/arrow.png"
as background.
This should work good for you in IE, Firefox and Opera .
Bare-bones examples:
select::-ms-expand { display: none; }
select { -moz-appearance: none; appearance: none; text-overflow: ''; /* this is important! */ }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With