views:

17

answers:

1

I have an optgroup like this:

 <optgroup label="Eller välj Län" title="Eller välj Län" style="background-color:#FC9;">
 <option value="Blekinge Län">Blekinge</option>
 <option value="Dalarna Län">Dalarna</option>
 <option value="Gotlands Län">Gotland</option>
 </optgroup>

Problem is, only in Firefox, the class applies to all options inside the optgroup. I need it to apply only to the optgroup label...

Any ideas why?

Thanks

+1  A: 

That's the "cascading" part of "Cascading Style Sheets". You'll need to explicitly set the background colors of the options (preferably in the external style sheet and not in-line):

optgroup {
  background-color: #FC9;
}

optgroup option {
  background-color: white; /* or whatever */
}
RoToRa