开发者

Aligning elements in <h:panelGrid />

开发者 https://www.devze.com 2023-03-26 07:25 出处:网络
I want to align elements as shown in the following image. There are 2 columns. One aligned to left of the parent and another aligned to right.

I want to align elements as shown in the following image.

Aligning elements in <h:panelGrid />

There are 2 columns. One aligned to left of the parent and another aligned to right. I don't want to specify anything in px or em. How do I achieve this in <h:pane开发者_开发知识库lGrid /> ?


Use CSS.

<h:panelGrid columns="2" columnClasses="column1,column2">
    ...
</h:panelGrid>

with

.column1 {
    width: 50%;
    text-align: left;
}

.column2 {
    width: 50%;
    text-align: right;
}

See also:

  • CSS tutorial
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号