Styling options in bold in Internet Explorer

后端 未结 3 1056
梦毁少年i
梦毁少年i 2020-12-01 23:32

I am getting a styling problem with options. I need some options to appear in bold style, but Internet Explorer doesn\'t want to render it.

I\'m setting it using CS

相关标签:
3条回答
  • 2020-12-02 00:12

    IE doesn't allow styling of <option> elements independently. This is because IE uses a Windows form control to render the select box, which doesn't support this feature.

    (as an aside, this is the same reason that IE's select boxes can have issues with layering when you put them behind other objects; the form control is being rendered by the Windows OS, not by the browser, so the browser has less control over it than most other elements on the page)

    Other modern browsers do allow you to do it, as they render their own select boxes rather than deferring to the OS.

    0 讨论(0)
  • 2020-12-02 00:19

    in IE, you can't style an option. I had the same issue...you can give it color but not much else.

    You could write a jquery plugin or find an existing one to "convert" your select to a styled list/dropdown.

    Also see: Create a styled Dropdown like on jquery UI

    0 讨论(0)
  • 2020-12-02 00:25

    You need to apply the font-weight:bold to the paragraph of text, not to an outer div or something else.

    Also, make sure nothing else is overriding this declaration. If the above doesn't work, change it to font-weight:bold!important and see if that fixes the problem.

    0 讨论(0)
提交回复
热议问题