I am looking to apply a CSS selector only on select option child values. I have assigned an id to the selector and now I want to apply different CSS styles to each child (child 1, child 2, etc).
<select name="options[81]" id="select_81" class="required-entry product-custom-option">
<option value="">-- Please Select --</option>
<option value="229" price="0">ariel </option>
<option value="230" price="0">times new roman </option>
</select>
I have tried several selectors but none seem to work:
select#select_81.required-entry.product.custom-option:nth-child(2){
font-family: 'Arial';
}
select#select_81.required-entry.product.custom-option:nth-child(3){
font-size: 30px;
font-weight: 800;
}
#select_81.required-entry.product.custom-option:nth-child(3){
font-size: 30px;
font-weight: 800;
}
#select_81:nth-child(3){
font-size: 30px;
font-weight: 800;
}
select#select_81option:nth-child(2), option:nth-child(3) {
font-weight: bold;
}
How can this be achieved using CSS?