与&lt对齐元素; H:panelGrid的/&GT; [英] Aligning elements in <h:panelGrid />
本文介绍了与&lt对齐元素; H:panelGrid的/&GT;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要为显示在下面的图片对齐元素。
I want to align elements as shown in the following image.
有2列。之一对准到左母体的和彼此对准到右。
我不想指定像素或EM东西。在我如何做到这一点&LT; H:panelGrid的/&GT;
There are 2 columns. One aligned to left of the parent and another aligned to right.
I dont want to specify anything in px or em. How do I achieve this in <h:panelGrid />
?
推荐答案
使用CSS。
<h:panelGrid columns="2" columnClasses="column1,column2">
...
</h:panelGrid>
与
.column1 {
width: 50%;
text-align: left;
}
.column2 {
width: 50%;
text-align: right;
}
参见:
- CSS教程
- CSS tutorial
See also:
这篇关于与&lt对齐元素; H:panelGrid的/&GT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文