mkoryak
mkoryak

Reputation: 57928

background color on a select tag breaks firefox UI

here is a regular <select> box look on firefox (osx):

enter image description here

if i add the following style to it:

form select.error {
    background-color: #FFAAAA;
}

it looks like this:

enter image description here

question: Is there any way to keep the pretty styling and still make it red?

Upvotes: 1

Views: 612

Answers (2)

Boris Zbarsky
Boris Zbarsky

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

Skylar Anderson
Skylar Anderson

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

Related Questions