Reputation: 57928
here is a regular <select>
box look on firefox (osx):
if i add the following style to it:
form select.error {
background-color: #FFAAAA;
}
it looks like this:
question: Is there any way to keep the pretty styling and still make it red?
Upvotes: 1
Views: 612
Reputation: 35054
The "pretty styling" is all a single background image drawn by the OS. So when you override it, Firefox has to fall back to some other kind of styling...
So no, you can't keep the original look but just change the background color.
Upvotes: 1
Reputation: 5703
You cannot reliably style select boxes as browsers tend to stick to the OS's defaults. Your anser is no, if you only intend on using CSS.
There are jQuery options for styling select boxes available: http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/
Upvotes: 1