Setting the height of a SELECT in IE

前端 未结 14 1980
忘掉有多难
忘掉有多难 2020-12-03 04:24

IE seems to ignore the height set in CSS when rendering a HTML SELECT. Are there any work around\'s for this or do we have to just accept IE will not look as good as other b

14条回答
  •  醉话见心
    2020-12-03 05:08

    There is a work-around for this (at least for multi-select):

    • set select size attribute to option list size (use JavaScript or set it to any large enough number)
    • set select max-height instead of height attribute to desired height (tested on IE9)

提交回复
热议问题