Forum Moderators: not2easy

Message Too Old, No Replies

How to influence option selected by css

Want option selected in an other background color

         

jetteroheller

5:14 am on Aug 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I just do not find out how to influence only option selected

Setek

5:33 am on Aug 3, 2006 (gmt 0)

10+ Year Member



Keeping in mind this will only work when the attribute
selected
is used in the x/html, and will only work for those browsers that support attribute selectors:

option[selected] { background: #f00; }

If you want on-the-fly selected, as a user selects it, I would have to vote javascript, because I don't think there's a solution that actually encompasses IE 6.