I am trying to add content to the selected option in a drop down list using css, when the drop down is closed. Specifically I want the drop down to say
Sort by: Option1
when closed and when you open the drop down you then see Option 1, Option 2 etc
I found this:
CSS :selected pseudo class similar to :checked, but for <select> elements
which shows how to apply a style to the right thing, but when I try and apply :before to the option element, nothing appears, in any circumstances. That is, I cannot seem to use the
option:before{
content:"before option"
}
as a rule to any effect.
Is this always the case for option elements? I also found that I could not wrap option text in span classes, so I can't do it that way.