Limit Initial width of select list

前端 未结 6 1120
春和景丽
春和景丽 2021-01-12 20:17

I have a select list, where some clients have entered insanely long options for them, which breaks the design. I\'m wondering if there is a way to set a fixed width on the s

6条回答
  •  执念已碎
    2021-01-12 20:33

    I don't know if you can do it with css (browser independent), but here are 2 other solutions:

    1. Instead of displaying "veeeeery looooooooooong teeeeeeeeext" you can display something like "veeeeery loooo...";

    2. Build your select using divs and lists so when it is closed to have a specific width and when you press something like an arrow to display full width. (I am not sure you understand what I'm trying to say with this one....).

提交回复
热议问题