I know I used the word select a lot there... sorry.
Anyway, I am looking for a CSS Selector that I can use to identify HTML Select elements on a page that do not have a selection made yet so that I can highlight them for the user to know those elements still need to be completed. I do have an empty option as the first element in the select, so if that helps... please use it.
My stupid attempts thus far: select:empty select[selectedIndex="0"]
<select>
<option value="" />
<option value="real selection" />
<select>
So essentially, I want to find all the selects where an option hasn't been selected, the value of the selection is 0, or the index of the selection is 0. (these are equivalent in my scenario). This way I can highlight those on my screen to let the user know, "hey, you've got more work to do."
FYI: Psuedo and CSS3 selectors are just fine for this scenario too.
!
from use with CSS; if that doesn't change then this may no longer be an option. – Ehrlich