Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
selectOneMenu我的JSF 页面上有一个。我想重新排列页面上的各个字段,为此我使用style="width:150px;"属性来限制selectOneMenu列表的宽度。
selectOneMenu
style="width:150px;"
这确实限制了列表的大小并且 UI 看起来不错,但是当我单击列表以选择一个项目时,显示项目也被限制为我设置的宽度,因此被截断。
有什么方法可以限制折叠列表的大小,但是当我展开 a 时selectOneMenu,我看到完整的菜单项没有被截断?
在您的 xhtml 的标头中使用并按照您喜欢的方式配置以下 css:
.ui-selectonemenu{width: 9.2% !important;} .ui-selectonemenu-label{width: 100% !important;}