tags:

views:

58

answers:

2

background-color:transparent doesnt work on SELECTs in browsers other than FireFox. So how I specify background-color:transparent for FF alone and background-color:#something for others ?

+2  A: 

Check out this page:

CSS Browser selector.

I use it and works wonders for selecting browsers right in the Stylesheet.

Hope it helps :)

Kyle Sevenoaks
Avoiding JavaScript for now.
Phonethics
+4  A: 

Did you try to apply the cross-browser setting first and the firefox specific setting afterwards?

select {
  background-color: #fff;
  background-color: transparent;
}

Find a simple example that is also working fine in Internet Explorer 8 and in Chrome 4 here: http://jsfiddle.net/b6hWu/

codescape
Tried. Works fine in FF } which should render in FF only but no luck.
Phonethics
In chrome the option elements seem to translate transparent background-color to white background color. A good post about the inconsistent behavior can be found here: http://www.electrictoolbox.com/style-select-optgroup-options-css/
codescape