"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > How to Hide the Dropdown Arrow of `` Elements in Firefox?

How to Hide the Dropdown Arrow of `` Elements in Firefox?

Published on 2024-11-19
Browse:545

How to Hide the Dropdown Arrow of `` Elements in Firefox?

Hiding the Dropdown Arrow of

Firefox's default behavior for

While "-webkit-appearance: button;" effectively hides the arrow in Chrome/Safari, the same approach using "-moz-appearance: button;" in Firefox doesn't produce the desired result.

To overcome this hurdle, we need to employ a different technique:

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

Here's how it works:

  • "-moz-appearance: none;" disables the default appearance, including the arrow.
  • "text-indent: 0.01px;" pushes the arrow slightly to the right.
  • "text-overflow: ''" trims the overflown arrow.

This clever combination effectively removes the unwanted arrow while maintaining the

Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3