I am trying to change the color of the initial (selected) text of my drop down menu on hover. For example, if 4am is the selected option, the text should only change on hover for that option. However the CSS I am applying is applying it for EVERY option within the drop down whenever I hover and try to select an option.
The "selected" option is dynamic depending on what time of the day someone shows up at website. I try to pre-select the closest hour to the time someone is visiting the website, which is why the hover is applied to the div rather than the selected option.
<div class="dropDownHover">
<select>
<option label="midnight" value="string:12:00 AM">midnight</option>
<option label="12:30 AM" value="string:12:30 AM">12:30 AM</option>
<option label="1:00 AM" value="string:1:00 AM">1:00 AM</option>
<option label="2:00 AM" value="string:2:00 AM">2:00 AM</option>
<option label="3:00 AM" value="string:3:00 AM">3:00 AM</option>
<option label="4:00 AM" value="string:4:00 AM" selected="selected">4:00 AM</option>
...
</select>
</div>
//css
.dropDownHover:{color: #333;}
.dropDownHover:hover{color: #ff0000;}
Any thoughts on how I could limit the hover effect to just the selected option?
Thanks in advance!