Having trouble with my HTML select form and modifying text color for specific options. In the provided example, I changed the color for the Tuesday option, but it only shows up when scrolling through the options. How can I make the color change visible for Tuesday even when it's selected at the top?
Fiddle:https://jsfiddle.net/bb61c412/280/
Code:
.form-control {
color: blue;
}
.selected {
color: red;
}
<link rel="stylesheet" type="text/css" href="https://bootswatch.com/bower_components/bootstrap/dist/css/bootstrap.min.css" />
<form action="#" id="form" method="post" data-toggle="validator" style='text-align:center;'>
<div class="form-inline">
<select class="form-control" name="date">
<option value="0">
Date
</option>
<option value="1">
Monday
</option>
<option value="2" selected class="selected">
Tuesday
</option>
<option value="3">
Wednesday
</option>
<option value="4">
Thursday
</option>
</select>
</div>
</form>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>