So i sm working on a application, where i need to have a select element with this text: 'sort element by option' where option is the option selected inside the select element, the select element should have always the sort element by text, i tried to add a before element but it didn't work. I also tried to add it to options tag. It worked but i don't want the 'sort element by option' text inside the opened select. Inside i just want the value.
So i have this at the moment:
<select>
<option>option</option>
</select>
select::before {
content: 'Sort element by'
color: black
}
i am searching a html/css solution, any help would be appreciate :)