Style of Select element behaviors different between IE 8 and FF
I have a select element, and want to change select itself as black background, white fore color, but have options be while background, black fore color. It works fi开发者_如何学运维ne in FF, but in IE, select element 'inherits' its option's style. I worked out the snippet at here http://jsfiddle.net/qc8gV/1/
You maybe want to open it in FF and IE to see what it looks different in the two browsers.
Is there anyone know how to solve it? Thanks.
Styling form controls is a tricky business, as the browser has control over them.
In many cases, leaving it up to the browser is a good idea, as the user of the browser is used to having the controls looking as they do.
456bereastreet have a very good write up about stylying form controls and what you can achive in what broswer: http://www.456bereastreet.com/archive/200409/styling_form_controls/
That link is a little out of date, so here is a more up to date one (thought notably still quite old, its still useful): http://www.456bereastreet.com/archive/200701/styling_form_controls_with_css_revisited/
I hope this helps Alex.
精彩评论