+ Start a Discussion
mgodseymgodsey 

Top align field in column in apex:pageBlockTable

Hi - is it possible to top align a cell in an apex:pageBlockTable, or am I going to have to try and build my own html table instead of using the pageBlockTable?
Best Answer chosen by mgodsey
Ashish_SFDCAshish_SFDC
Hi , 


You can use the sample syntax, 

<apex:pageBlock >
        <apex:pageblockTable value="{!CallReportData}" var="task">
            <apex:column breakBefore="true" style="vertical-align:Top;height:20">

Or , 

<apex:outputPanel id="queueWrapper">
         <apex:pageBlock title="{!accountsForExport.size} Accounts to Export" rendered="{!accountsForExport.size > 0}" id="exportBlock">
          <apex:pageBlockButtons location="top">
           <table style="width:600px;">
            <tr> 
             <td style="vertical-align:middle;width:270px;" valign="middle">

Or, 

<apex:column style="vertical-align:top; text-align:center;">


Regards,
Ashish


All Answers

Ashish_SFDCAshish_SFDC
Hi , 


You can use the sample syntax, 

<apex:pageBlock >
        <apex:pageblockTable value="{!CallReportData}" var="task">
            <apex:column breakBefore="true" style="vertical-align:Top;height:20">

Or , 

<apex:outputPanel id="queueWrapper">
         <apex:pageBlock title="{!accountsForExport.size} Accounts to Export" rendered="{!accountsForExport.size > 0}" id="exportBlock">
          <apex:pageBlockButtons location="top">
           <table style="width:600px;">
            <tr> 
             <td style="vertical-align:middle;width:270px;" valign="middle">

Or, 

<apex:column style="vertical-align:top; text-align:center;">


Regards,
Ashish


This was selected as the best answer
mgodseymgodsey
This is perfect; exactly what I needed. Thank you so much!