How do I style a <select> dropdown with only CSS?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
You can style a native select control quite well with CSS, but only within the limits of what browsers expose. The closed field can be customized reliably, while the opened dropdown list is still mostly controlled by the browser and operating system.
Styling the Closed Control
The safest approach is to keep the real select element and style the visible field around it. That preserves keyboard behavior, screen-reader support, and mobile-friendly platform interactions.
This handles the field itself: spacing, typography, border, and focus treatment.
Replacing the Native Arrow
Once you remove the browser's default appearance, you usually need to draw your own arrow. The standard pure-CSS pattern is to place it on a wrapper with a pseudo-element.
Using the wrapper matters because pseudo-elements on the select itself are not consistently reliable across browsers. The wrapper solution keeps the markup simple and the control accessible.
What You Can and Cannot Control
CSS works well for the closed state of the control. You can usually control:
- padding and width,
- border and corner radius,
- colors and fonts,
- focus and disabled states,
- the custom arrow treatment.
The opened popup is a different story. Browser engines and operating systems render the options list using native UI components, so things like row height, full hover styling, scrollbars, and popup animation are not consistently customizable.
That means "style a dropdown with only CSS" is realistic if you mean the collapsed control. It is not realistic if you mean turning the opened menu into a fully custom visual component across every browser.
Styling States Cleanly
State styling is often more valuable than over-customizing the arrow. Focus, error, and disabled states make the control feel deliberate and easier to use.
These visual states matter more for usability than trying to force exact pixel-level control over the native popup.
When CSS-Only Stops Being Enough
If the requirement is searchable options, grouped icons, custom keyboard behavior, animated panels, or rich option content, you are no longer working with a plain native control. At that point you need a custom widget built with HTML, CSS, and JavaScript, plus careful accessibility work.
That is a bigger project. A native select remains the right choice when you want reliability, low complexity, and standard browser behavior.
Common Pitfalls
- Expecting the open dropdown popup to be as fully styleable as an ordinary
div. - Removing native appearance and forgetting to add a visible focus style.
- Hiding the real
selectand replacing it with a fake non-accessible control. - Drawing the custom arrow on the
selectitself instead of using a wrapper. - Testing in only one browser and assuming all other engines will match exactly.
Summary
- CSS can style the closed
selectcontrol well, but not the open popup uniformly. - '
appearance: noneplus a wrapper and pseudo-element is the usual pure-CSS technique.' - Keep the real native control to preserve accessibility and keyboard support.
- Focus, disabled, and error states are worth more attention than extreme visual customization.
- If you need a fully custom dropdown experience, CSS alone is not enough.

