Chosen harvesthq resize width dynamically

前端 未结 12 1524
渐次进展
渐次进展 2020-12-30 03:49

How can you have a harvesthq Chosen dropdown with a dynamic width style?

By default it has a fixed width and if you try to modify it with CSS you will have several p

12条回答
  •  一生所求
    2020-12-30 04:11

    Although partly mentioned above, I would like to point out the following solution:

    .chosen-container {
        width: 100% !important;
    }
    

    This way your chosen widget will always be 100%, and resize accordingly. If you need it to be some other width, change the percentage or encapsulate the select itself with another element, and set the width on that element instead.

提交回复
热议问题