开发者

Aligning elements in <h:panelGrid />

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜