Prabhat
Prabhat

Reputation: 2263

Aligning elements in <h:panelGrid />

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

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:panelGrid /> ?

Upvotes: 1

Views: 8735

Answers (1)

BalusC
BalusC

Reputation: 1108682

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:

Upvotes: 7

Related Questions