On Macs and iOS devices, in Safari, a <select>
element with a background color generates a gloss over itself. This does not seem to happen in other operating systems.
For example, I have a select element with these style properties:
select {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
padding: 3px 6px;
margin: 10px 0 7px;
width: 250px;
background-color: #BD2786;
color: white;
letter-spacing: -.04em;
font-weight: bold;
border: 0;
}
And my element has the background color I want, but the gloss is still there. Does anyone know how to make it a flat color?
Using
-webkit-appearance:none;
will remove also the arrows indicating that this is a dropdown.See this snippet that makes it work across different browsers an adds custom arrows without including any image files:
@beanland; You have to write
in your css.
read this http://trentwalton.com/2010/07/14/css-webkit-appearance/
If you inspect the User Agent StyleSheet of Chome, you'll find this
in short its outline property - make it None
that should remove the glow
Check out -webkit-appearance: none and its derivatives. Originally described by Chris Coyer here: https://css-tricks.com/almanac/properties/a/appearance/
Sorry to pile on to an old item. I found partial answers to my questions here but had to do some work so I wanted to share my results for the next person.
I ended up using the same approach as the other contributors, but with a few tweaks to fix the following
The below will give you a working solution with the above issues fixed. Note: I used a white arrow for my use case, you may need to change the color of the arrow for yours.
here's a preview: