HTML select box not showing drop-down arrow on android version 4.0 when set with background color

I need to set the background color for select box as yellow.
When i tested,it does show box with yellow color and arrow on android 2.3 and android 3.0.

But on android 4.0 it shows the select as complete yellow without the drop-down arrow.

Any idea how to resolve the issue?

I am designing this with phone-gap.

This is my code where i am setting background-color for html select.

<select style="background-color:#FFFF00;border:#FFFF00;height:25px;font-family:Arial, Helvetica, sans-serif; color:#000000; font-size:14px; font-weight:bold; text-align:center;">


The Android Browser’s rendering of <select>s is buggy and will remove the normal styling if a background or border is applied.

Since <select>s not looking like <select>s is a pretty big usability issue, your best bet is to not style them for this browser only.

Unfortunately, there’s no pure CSS way of selecting/excluding the Android Browser, so I recommend you use Layout Engine (, which will add a class of .browser-android to the <html> tag.

You could then style all <select>s except on Android Browser, like so:

html:not(.browser-android) select {
    background: #0f0;
    border: 1px solid #ff0;

I had this same issue & i was wondering till now why this is happening as it don’t not happen on some of the other projects.

While trying to learn more about Bootstrap & Foundation Framework i found the solution on bootstrap as they have raised this problem on some mobile device if we mentioned border or background for the drop-downs.

I am not taking credit from any one but would like to share links of page where it is mentioned & solution is also given

Read More:   How to get the overflowed width of an element in a webpage


JS Bin:

I hope this will be useful to other who might face this issue this solution is related to bootstrap. & can me modified to your project needs.

var nua = navigator.userAgent;
var is_android = ((nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1) && !(nua.indexOf('Chrome') > -1));
if(is_android) {
        $('select.form-control').removeClass('form-control').css('width', '100%');


something like this might work to recalculate a moment after since the outerHeight of the children was wrong on android at the time (as I mentioned earlier).

window.setTimeout(function() {$(window).trigger(‘resize’);}, 1500);

…might work? Yes that seems to help.

Obviously you just want this to trigger once after the initial loading phase has had time to pass (in obvious error of the spec, which all others are currently complying with).

As Matt indicated if you apply any type of border or background to the menu you will vaporize the drop down arrow.

Simplest solution, just remove any border or custom background color. This will leave you with a nice white and gray “modern” looking drop down arrow on Android devices. I don’t think there are any sites that it wouldn’t fit fine in.

If you don’t want to use JavaScript for that and/or just feel bad about UA sniffing (as you should), but are okay with targeting few browsers less:

    /* common, “safe” styles */
@supports (appearance: none)
        /* borders and backgrounds */

Noticeable absentees are all of IEs (Edge will get full styles):

Read More:   How to trigger / bind custom events in Backbone.js views?

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Similar Posts