I am trying to make the select box italic and other half NOT-italic
Sample needed output:
I have tried the code below but the whole thing is in italic
$(document).ready(function() {
$('#mySelect .firstOption').html("<span>NOT ITALIC </span><option>italic</option>");
$('#mySelect').css('font-style', 'italic');
$('#mySelect option').css('font-style', 'normal');
$('#mySelect option span').css('font-style', 'normal');
});
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<select id="mySelect">
<option class='firstOption'></option>
<option>non-italic</option>
<option>non-italic</option>
</select>