Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the default arrow icon from a dropdown list (select element)?

I want to remove the dropdown arrow from a HTML <select> element. For example:

<select style="width:30px;-webkit-appearance: none;">     <option>2000</option>     <option>2001</option>     <option>2002</option>     ... </select> 

How to do it in Opera, Firefox and Internet Explorer?

enter image description here

like image 623
user2301515 Avatar asked May 17 '13 07:05

user2301515


People also ask

How do I remove the arrow from the drop-down menu?

Every Bootstrap dropdown button or link has an ::after selector in CSS. ::after selector is often used to insert some text after the content of the element. In this case, the content is a dropdown arrow. To remove it, just make the content go 'none'.

How do I remove the default drop-down arrow in Internet Explorer?

Drop-down Arrow for Chrome, Firefox, Opera, Internet Explorer 10+ For these browser, it is easy to set the same background image for the drop-down in order to have the same arrow. To do so, you have to reset the browser's default style for the select tag and set new background rules (like suggested before).


1 Answers

There's no need for hacks or overflow. There's a pseudo-element for the dropdown arrow on IE:

select::-ms-expand {     display: none; } 
like image 188
nrutas Avatar answered Sep 21 '22 03:09

nrutas