css - How can i fix the column width of <p:panelGrid>? -


i working on jsf application in that

i having doubt in adjusting column width in panelgrid

my code :

  <p:panelgrid id="grid" columns="2" cellpadding="5"  styleclass="panelgrid" style="border:none;margin:0 auto;width:500px;"   >         <p:column style="width:250px">          <h:outputtext value="to :" />       </p:column>           <p:column style="width:250px">           <h:outputtext value="#{bean.name}" />       </p:column>            <p:column style="width:250px">         <h:outputtext value="address :" />       </p:column>         <p:column style="width:250px">         <p:outputlabel value="#{bean.address}" />         </p:column>   </p:panelgrid> 

here want fix width if first column 250px , mentioned

<p:column style="width:250px">

i tried

but not working, column width varying depend upon second column ... can why happening.. or suggest other way this..

i suggest use both <p:row /> , <p:column /> described in showcase. <p:row /> managed simmilar css problem work. this:

<p:panelgrid id="grid" columns="2" cellpadding="5"  styleclass="panelgrid" style="border:none;margin:0 auto;width:500px;"   >      <p:row>       <p:column style="width:250px">          <h:outputtext value="to :" />       </p:column>           <p:column style="width:250px">           <h:outputtext value="#{bean.name}" />       </p:column>     </p:row>    <p:row>        <p:column style="width:250px">         <h:outputtext value="address :" />       </p:column>         <p:column style="width:250px">         <p:outputlabel value="#{bean.address}" />         </p:column>    </p:row>   </p:panelgrid> 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -