Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Option in italics

Is there any cross-browser way to italicize select options?
With the following CSS and HTML, FireFox shows the second option in italics, but not the third.
None of the options are italicized in IE 7 or Safari.

<style>
    option.bravo
    {
        font-style: italic;
    }
</style>

<select>
    <option>Alpha</option>
    <option class="bravo">Bravo</option>
    <option><i>Charlie</i></option>
<select>

Am I correct in assuming this is not possible?

like image 460
MikeWyatt Avatar asked Feb 15 '10 20:02

MikeWyatt


1 Answers

This page has a nice chart of browser support of styling select, option and optgroup: http://www.electrictoolbox.com/style-select-optgroup-options-css/

According to that, the like the only option style that's cross-browser is color.

like image 82
Seth Avatar answered Nov 07 '22 13:11

Seth