如何自动调整底层子菜单的长度 [英] how to auto adjust the length of submenu of primefaces
问题描述
我使用< p:tieredMenu model =#{ServerGroupMgmtBean.model}id =serverGroupMenu/>
创建一个动态菜单。如果子菜单中有许多菜单项,则某些菜单不能在一行中显示。
您可以直接使用样式css更改项目的宽度,您可以获取组件的样式类 c I create a dynamic menu with You can change item's width by using style css directly, you can get component's style class by
这篇关于如何自动调整底层子菜单的长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
检查浏览器的
函数,将此代码片段添加到您的facelet文件(.xhtml,...) pre> < style type =text / css>
.ui-menu.ui-menu-parent.ui-menu-child {
width:120%!important; //或任何你想要的东西
}
< / style>
<p:tieredMenu model="#{ServerGroupMgmtBean.model}" id="serverGroupMenu"/>
. If there are many menu items in the Submenu, some of the menus cannot display in one row. Is there any solution to fix this?Inspect element
function of browser, add this snippet code to your faceslet file(.xhtml,...):<style type="text/css">
.ui-menu.ui-menu-parent.ui-menu-child{
width: 120 % !important; // or anything you want
}
</style>