限制选择列表的初始宽度 [英] Limit Initial width of select list

查看:97
本文介绍了限制选择列表的初始宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个选择列表,其中一些客户端输入了疯狂的长选项,这打破了设计。我想知道是否有一种方法设置一个固定的宽度在选择小部件,但仍然有下拉菜单,它产生仍然足够宽,显示所有的选项。

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 select widget, but still have the drop down menu it produces still be wide enough to display all of the option.

推荐答案

不知道你是否开放使用jQuery,但我通常使用这种方法:

Not sure if you're open to using jQuery at all but I usually use this method:

http:// css -tricks.com/select-cuts-off-options-in-ie-fix/

有点乱,但看起来比切断内容更好

Is a bit choppy but looks better than cutting off the content

这篇关于限制选择列表的初始宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆