本文介绍了如何在PrimeFaces中更改面板网格的列宽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Java EE和PrimeFaces.如何在PrimeFaces中更改面板网格的列宽?有例子吗?

I am working with Java EE and PrimeFaces. How can I change the column width of a panel grid in PrimeFaces?Is there an example ?

推荐答案

您可以使用columnClasses在panelGrid中限定列.以下代码设置了不同的宽度,并将单元格内容粘贴到顶部.

You can qualify your columns inside the panelGrid using columnClasses. The following code sets different width and stick the cells content aligned to the top-side.

<h:panelGrid columns="2" style="width: 100%" columnClasses="forty-percent top-alignment, sixty-percent top-alignment">
.forty-percent {
     width: 40%;
}

.sixty-percent {
     width: 60%;
}

.top-alignment {
     vertical-align: top;
}

这篇关于如何在PrimeFaces中更改面板网格的列宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 01:14