0

I have a panelGrid with some columns but content of one column always at center, how cant I take it to top. I have 2 columns and when content of them not same height, on columns will stay on center, so bad. Tks for help!

Thangnv
  • 805
  • 3
  • 11
  • 22

1 Answers1

2

You need to set the CSS vertical-align property to top on the generated HTML <td> element. Assuming that you want to apply this on the entire <p:panelGrid> throughout all pages, then this should do:

.ui-panelgrid td {
    vertical-align: top;
}

Or, if you want to apply it on a specific <p:panelGrid> only, then do:

<p:panelGrid ... styleClass="aligned-top">

with

.ui-panelgrid.aligned-top td {
    vertical-align: top;
}

Or, if you want to apply it on a specific <p:panelGrid> column only, e.g. the second column only, then do:

<p:panelGrid ... columns="3" columnClasses="none,aligned-top,none">

with

td.aligned-top {
    vertical-align: top;
}

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555