Aligning content inside panelGrid columns

jsfprimefacesrichfaces

How do I align the content in the columns created by panelGrid component to the top ?

I tried with no success, the following code

<h:panelGrid columns="2" style="vertical-align:top;  " >
       <p:tabView style="margin:0px 0px 50px 0px; width: 450px; padding-top: 0px;vertical-align:top" ></p:tabView>                
       <p:menubar autoSubmenuDisplay="true" style="width: 300px; vertical-align:top" ></p:menubar>
</h:panelGrid>

But the 2 columns created hereby still remain vertically middle aligned.

Best Solution

Based on this answer, you can do like this (I like this approach the most)

<h:panelGrid columnClasses="className">

.className {
    vertical-align: top;
}
Related Question