How to remove the default arrow icon from a dropdown list?
Last Updated :
11 Oct, 2024
Removing the default arrow icon from a dropdown list (<select> element) means hiding the built-in down-facing arrow provided by the browser. This allows for custom styling of the dropdown, giving developers control over its appearance using custom icons or designs.
Here we have some common approaches:
Using Custom Styling to Remove the Default Arrow
This approach uses CSS to remove the default arrow from a dropdown (<select> element) by applying custom styles. Techniques include setting background properties or hiding the default appearance, allowing for custom dropdown designs without the default browser icon.
Example 1: In this example we example creates a dropdown list for selecting difficulty levels. It includes options like "School" and "Hard" while demonstrating how to potentially remove the default arrow icon using custom styling.
html
<!DOCTYPE html>
<html>
<head>
<title>Remove Arrow From Dropdown</title>
</head>
<body>
<h1 style="color: #008000">GeeksforGeeks</h1>
<b>
How to remove the default arrow
icon from a dropdown list?
</b>
<p>
A sample dropdown list for difficulty
level of a problem:
</p>
<div class="dropdown-container">
<!-- This is our drop-down element -->
<select>
<option value="none" selected disabled hidden>
Select difficulty level.... </option>
<option>School</option>
<option>Basic</option>
<option>Easy</option>
<option>Medium</option>
<option>Hard</option>
</select>
</div>
</body>
</html>
Output:

Using e -moz-appearance, -webkit-appearance
The approach uses CSS properties -moz-appearance: none; and -webkit-appearance: none; to eliminate the default dropdown arrow in Firefox, Safari, and Chrome. Additionally, select::-ms-expand { display: none; } is used for Internet Explorer.
Example: In this example we demonstrates how to remove the default arrow from a dropdown list using CSS properties like -moz-appearance, -webkit-appearance, and hiding it in Internet Explorer with select::-ms-expand.
html
<!DOCTYPE html>
<html>
<head>
<title>Remove Arrow From Dropdown</title>
<style>
/* apply CSS to the select tag of
.dropdown-container div*/
.dropdown-container select {
/* for Firefox */
-moz-appearance: none;
/* for Safari, Chrome, Opera */
-webkit-appearance: none;
}
/* for IE10 */
.dropdown-container select::-ms-expand {
display: none;
}
</style>
</head>
<body>
<h1 style="color: #008000">GeeksforGeeks</h1>
<b>
How to remove the default arrow
icon from a dropdown list?
</b>
<p>
A sample dropdown list for difficulty
level of a problem:
</p>
<div class="dropdown-container">
<!-- This is our drop-down element -->
<select>
<option value="none" selected disabled hidden>
Select difficulty level....
</option>
<option>School</option>
<option>Basic</option>
<option>Easy</option>
<option>Medium</option>
<option>Hard</option>
</select>
</div>
</body>
</html>
Output:
Similar Reads
How to remove arrow in dropdown in Bootstrap ? Dropdowns are one of the important components that are an integral part of any web application. Bootstrap provides its own interactive version of this component. Bootstrap dropdowns are toggled by clicking, not hovering as it was an intentional design decision. To use Dropdowns in a web project, inc
2 min read
How to Remove Default List Style from Unordered List in CSS ? Unordered lists in HTML are typically styled with bullet points by default. However, there may be instances where you want to remove this default styling for a cleaner look or to apply custom styles. In this article, we will explore various methods to remove the default list styling for an unordered
2 min read
How to replace dropdown-toggle icon with another default icon in Bootstrap ? Bootstrap provides the option of adding a dropdown to our websites. The default icon on the dropdown button is the 'downward solid arrow' logo. Even though it serves its purpose, most of the modern-day websites nowadays use Bootstrap. Therefore, the icon might look very generic to the visitor.Progra
3 min read
How to disable the drop-down list in HTML5 ? In this article, we will learn how to disable the drop-down list in HTML5. The drop-down is used to create a list of items that need to select an element. We use <select> and <option> elements to create a drop-down list and use the disabled attribute in <select> element to disable
2 min read
How to remove grey circle around the icon in jQuery UI ? In this article, we will learn to remove the grey circle around the circular shape-icons in jQuery UI, along with knowing their implementation through the examples. This task can be accomplished by making use of the ui-nodisc-icon class. jQuery UI is a systematically organized set of user interface
3 min read
How to create a dropdown menu in Bootstrap ? A dropdown menu offers a list of alternatives when clicked or hovered on, which is a clean method of providing a list of alternatives as only one option is displayed initially onto the screen. Drop-down menus are used in almost all types of software nowadays to show sub-options of the option. Step 1
2 min read