5

Is there a good way hide the default drop down arrow for all browsers? I know the question has been asked couple times but there does NOT seem to be a solution which would work for all browsers and neither of them look nice. Couple years has passed already and I wonder if there exists a good solution now?

4
  • create a button that acts like a dropdown and give it functionality with javascript for example Commented Dec 12, 2014 at 0:54
  • @baao has to be a select unfortunately Commented Dec 12, 2014 at 0:55
  • 1
    Can't you use javascript in your project? I don't think that you will find a html css only solution for this. I've searched for long, I really don't like the select's style. If you can use javascript/jQuery, maybe this is something for you harvesthq.github.io/chosen Commented Dec 12, 2014 at 1:01
  • 1
    I am essentially using the Select as a display. I am populating the values of the options on the server side and then the client side is going to ajax to get the Data. The data is going to be an int instead of String (can't change that). And then I will be setting the Select's Value = value to display it. I could make another request to get the Enum List but... that's Plan B Commented Dec 12, 2014 at 1:06

3 Answers 3

3

The best way I could fine is this:

    select::-ms-expand
    {
        display: none;
    }
    select
    {
        -webkit-appearance: none;
        -moz-appearance: none;      
        appearance: none;
        padding: 2px 30px 2px 2px;
        /*border: none; - if you want the border removed*/
    }

This works in Chrome and IE.

Unfortunately in your case -moz-appearance:none does not seem to currently be fully supported.

There is a bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=649849 which which has a RESOLVED FIXED status but seems to be dependant on another bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=1076846 which has a NEW status so hopefully it will be fixed soon.

Sign up to request clarification or add additional context in comments.

Comments

2

https://gist.github.com/joaocunha/6273016/

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

Comments

0

For webkit browswers, -webkit-appearance: none will remove ALL of the default browser's select styling. Keep in mind that this is reliable, but it will remove ALL styling, not just the arrow. There is no other dependable solution at this point.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.