I am using a wordpress theme and for some reason, the HTML select
boxes do not have the drop down area. They look like just plain input
text boxes, although when you click on them, you can see the drop down list. I can't find what code might be stripping away the drop down arrows.
This is all I see in the CSS:
input:focus { outline: none; } select, input, textarea { -webkit-appearance: none; -webkit-border-radius:0; border-radius:0; }
It's simple a matter of stack order. You can use pointer-events: none; so that the dropdown shows dropdown when you click on the arrow.
The dropdown arrow icon in <select> input can be hidden by setting the CSS appearance: none. The CSS appearance property allows to suppress the native appearance of an element (which may vary with operating system), so that CSS can be used to restyle it.
Press and hold the "Alt" key. Press number "2" followed quickly by number "5." Release all keys. This displays a downward-pointing arrow character in your Facebook status or message.
Here is a basic select
<select> <option>1</option> <option>2</option> <option>3</option> </select>
Now lets see where is your issue:
select { -webkit-appearance: none; /*webkit browsers */ -moz-appearance: none; /*Firefox */ appearance: none; /* modern browsers */ border-radius: 0; }
<select> <option>1</option> <option>2</option> <option>3</option> </select>
So when you set none
to appearance
you are removing the arrow (which by default is menulist
), and when you are setting 0
to border-radius
, you are removing the border
by default of the select
.
NOTE If you have hidden the arrow in IE with this rule select::-ms-expand { display: none; }
to have the arrow back you would need to set it display:block
You have overridden the -webkit-appearance
property for select
, which was set as -webkit-appearance: menulist;
as default value by browsers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With