Is there any way to make an <option> tag bold in a select box in Chrome and IE using CSS? It’s working in Firefox.
option.red {
background-color: #cc0000;
font-weight: bold;
font-size: 12px;
color: white;
}
<select name="color">
<option class="red" value="red">Red</option>
<option value="white">White</option>
<option value="blue">Blue</option>
<option value="green">Green</option>
</select>
This is the same question as here, but there was no answer.
You cannot do this. The most likely solution you’ll find “out there” would be to add a surrounding span with hard coded style, but neither IE (7) nor Firefox (3.0.12) honor this.
What you can do is use a JavaScript solution to give you the appearance of a select without actually using a select.
And here’s a great “howto” on how to do it: http://www.devirtuoso.com/2009/08/styling-drop-down-boxes-with-jquery/