How to remove default dropdown icon from Select list in HTML CSS?


Hello, I would like to remove the default arrow from the select list dropdown of below HTML, using CSS , suppose here is my sample HTML

<select>
   <option value="1">1</option>
   <option value="2">2</option>
   <option value="3">3</option>
</select>

So, how to remove default arrow icon from HTML select?


Asked by:- bhanu
1
: 2812 At:- 12/6/2021 4:05:19 PM
HTML CSS







1 Answers
profileImage Answered by:- vikas_jk

Here is the simple CSS code to remove arrow icon from dropdown

select {
  /* for Firefox */
  -moz-appearance: none;
  /* for Chrome */
  -webkit-appearance: none;
	width:100px;
	padding:10px;
	border:none;
}

/* For IE10 */
select::-ms-expand {
  display: none;
}

You can try this fiddle https://jsfiddle.net/3yqkhaw2/

You will see output like below

remove-arrow-dropdown-html-min.png

If it doesn't work for IE, you can try below CSS for IE

select {
    overflow:hidden;
    width: 120%;
}

Hope it helps, thanks

1
At:- 12/6/2021 4:43:27 PM
Thanks for fiddle, works as needed. 0
By : bhanu - at :- 12/6/2021 4:45:23 PM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use