开发者

background color on a select tag breaks firefox UI

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

background color on a select tag breaks firefox UI

if i add the 开发者_如何学Pythonfollowing style to it:

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

it looks like this:

background color on a select tag breaks firefox UI

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


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.


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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜