3

Possible Duplicate:
Is it possible to style a select box?

I would like to know if it is possible with CSS to change the styling of a HTML select field. I want to make the button with the arrow inside transparent but keep the arrow there, so basically removing the button look of the arrow.

Community
  • 1
  • 1
Scott Hallauer
  • 389
  • 2
  • 8
  • 16
  • Ok, how could I do it with JQuery? – Scott Hallauer Nov 12 '12 at 13:09
  • How can this be marked as a duplicate when the "original question" was closed for being off-topic? – JBH Jul 17 '17 at 19:34
  • @ScottHallauer I realize you asked this 5 years ago, but I ran into the same issue. I realized that there are 100+ options for the appearance rule, one being -webkit-appearance: menulist-button. This prevented that default select styling, while also maintaining the caret. Then I made the background transparent. This worked for me. – intrepid_em Aug 21 '17 at 17:43

2 Answers2

3

That is not possible to accomplish cross browser with only CSS.

To get nice looking select fields you must use javascript.

There are a couple libraries for this:

http://www.emblematiq.com/lab/niceforms/

http://uniformjs.com/

I am pretty sure you can find more if you just google for it.

noslone
  • 1,301
  • 10
  • 14
1

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

be sure to read the comments too, this will probably not work in old(er) browsers, jquery is the better solution

Pieter Willaert
  • 879
  • 13
  • 36