Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select box arrow style

Tags:

html

css

I want to make the second select box arrow become the same with the first one. But I have no idea why they are different, because I didn't style the arrow.

enter image description here

like image 487
hungneox Avatar asked Jun 25 '12 08:06

hungneox


People also ask

How do you style select box arrows?

The main trick is to apply appearance: none which lets you override some of the styling. It doesn't replace the OS select menu UI element so all the problems related to doing that are non-existant (not being able to break out of the browser window with a long list being the main one).

How do you change the arrow color on a select box?

Attach Inspector, press Ctrl+Shift+LMB on that arrow and you'll see what you should change.

How do I style a select dropdown?

There are many ways to design a <select> dropdown menu using CSS. The Dropdown Menu is mainly used to select an element from the list of elements. Each menu option can be defined by an <option> element that can nested inside the <select> element.


2 Answers

Browsers and OS's determine the style of the select boxes in most cases, and it's next to impossible to alter them with CSS alone. You'll have to look into replacement methods. The main trick is to apply appearance: none which lets you override some of the styling.

My favourite method is this one:

http://cssdeck.com/item/265/styling-select-box-with-css3

It doesn't replace the OS select menu UI element so all the problems related to doing that are non-existant (not being able to break out of the browser window with a long list being the main one).

Good luck :)

like image 55
will Avatar answered Oct 09 '22 18:10

will


you can use jQuery selectbox replacement. It's a jQuery plugin.

http://cssglobe.com/post/8802/custom-styling-of-the-select-elements

The Pure-css http://bavotasan.com/2011/style-select-box-using-only-css/

like image 31
Rohit Azad Malik Avatar answered Oct 09 '22 18:10

Rohit Azad Malik