How to remove the dropdown select arrow in Firefox

by Joe Cisneros

HTML

<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>Now you're free to style it any way you want :)</h2>

<small>Brough to you by <a href="http://twitter.com/joaocunha">@joaocunha</a>. If you figured this out before me, give me a shout.</small>

CSS

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    text-indent: 1px;
    text-overflow: '';
}








/* == general styling, don't bother with it == */
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;
}