I am using a WordPress theme, and for some reason the HTML select
elements look like plain input
fields; although, when you click on them you can see the drop-down list.
I cannot find what code might be stripping away the drop-down arrows.
The following is what I can see in the CSS.
input:focus {
outline: none;
}
select,
input,
textarea {
-webkit-appearance: none;
-webkit-border-radius: 0;
border-radius: 0;
}
The following is a basic select element with its options.
Now let’s see where your issue is:
When you set
none
toappearance
you are removing the arrow, and when you set0
toborder-radius
you are removing theborder
of theselect
by default.You can restore the arrow by setting the
appearance
tomenulist
(i.e., the default value) orlistbox
orauto
.NB: If you have hidden the arrow in IE with this rule
select::-ms-expand { display: none; }
, then you would need to set it todisplay: block
to get the arrow back.You have overridden the
-webkit-appearance
property forselect
, of which its default value is set as-webkit-appearance: menulist;
by many browsers.I know I’m answering this question late, but my following CSS solution worked for me.
It may be helpful for someone else.
You can wrap the
select
in adiv
and on thatdiv
you can give::after
element and style:The chosen answer is correct for most, but it didn’t work for me. However, the following line of code did the trick.
I have tried above solutions but it was not working for UI, which was created using
jquery.min.css
. I have tried below css and it resolved my issue. Here I am targeting.ui-icon-carat-d
, which shown dropdown arrow and setting dropdown icon there:I was too getting the same issue, have got the drop down arrow after adding the below jquery file jquery-3.4.1.js