开发者

How to apply different styles to options of select tag in HTML

开发者 https://www.devze.com 2023-01-04 12:39 出处:网络
I am trying to apply some CSS class on the options of a drop down. The CSS apply correctly in Firefox, but in IE (7, 8) only color is getting applied. Can any body tell me how to a开发者_高级运维pply

I am trying to apply some CSS class on the options of a drop down. The CSS apply correctly in Firefox, but in IE (7, 8) only color is getting applied. Can any body tell me how to a开发者_高级运维pply styles on options of drop down for IE 7 and IE 8.

 .regionOption {
    font-weight: bold; 
 }

 .countryOption {
    margin-left: 10px;
    padding-left:5px;
 }

I am using these CSS classes on options depending upon conditions. They work fine in Firefox.

I want to show difference between Region and country, is there any other way?

Thanks Ashwani


Internet Explorer does not currently support the full range of styles on option elements.

The full list of supported styles appears on the following MSDN article under the section titled "Styles":

http://msdn.microsoft.com/en-us/library/ms535877%28VS.85%29.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消