Selected Options disappear in a multiple drop-down select tag with scroll bar in HTML

后端 未结 2 1981
走了就别回头了
走了就别回头了 2021-01-18 18:05

I have the following multiple drop down select tag

2条回答
  •  鱼传尺愫
    2021-01-18 18:34

    Not sure why it does that, I can reproduce in Chrome.

    This seems to fix it. Setting float: left; min-width: 100%; on the element style.

    float: left destroys the default block formatting context behaviour of the tags in the are "fully highlighted" when selected.

    P.S. This fixes the issue for Chrome and IE11, won't fix it for IE10- and Firefox as they don't support horizontal scrolling on a

提交回复
热议问题