<h1>How to remove the select arrow in Firefox</h1>
<select>
<option>Firefox</option>
<option>Chrome</option>
<option>Internet Explorer</option>
<option>Safari</option>
</select>
<h2>It's as <del>hacky</del> simple as that:</h2>
<ol>
<li>Set <code>-prefix-appearance</code> to none to remove the styles;</li>
<li>Use <code>text-indent</code> to "push" the content a bit to the right;</li>
<li>Finally, set <code>text-overflow</code> to an empty string. Everything that extends beyond it's width will become... nothing! <strong>And that includes the arrow.</strong></li>
</ol>
<h2>More info and background:</h2>
<p>Check <a href="https://gist.github.com/joaocunha/6273016">my gist</a>.</p>
<h2>Brought to you by</h2>
<p><a href="http://twitter.com/joaocunha">@joaocunha</a> - follow the guy!</p>
<small>Thanks <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=649849#c85">Binyamin</a> for improving the indentation size</small>
CSS
select {
-moz-appearance: none;
text-indent: 0.01px;
text-overflow: '';
}
/*
## Chrome ##
select {
-webkit-appearance: none;
}
## IE10 ##
select::-ms-expand {
display: none;
}
## IE < 10 ##
Probably position:absolute; and clip:rect; would do the trick
*/
/* == general styling, nothing to do with the fix == */
body {
font-family: verdana, arial, sans-serif;
font-size: 12px;
color: #333;
}
h1 {
text-align: center;
font-size: 24px;
margin-bottom: 36px;
}
h2 {
font-size: 18px;
margin-top: 36px;
}
code {
background: #ccc;
font-family: courier, monospaced;
padding: 0 5px;
}
del {
color:#ccc;
}
li {
margin: 10px;
}
a {
font-weight: bold;
}
small {
color: #ccc;
}
JavaScript
// sorry, nothing to see here :)
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.