Align the column headers as a center using apex:dataTable
Yes this is possible, you have to create a css class in your VF page. And then include in apex:column
Like this,

<apex:page standardController="Account" extensions="AccountContacts">
<apex:form id="frm">
<apex:pageBlock title="Accounts Info">
<apex:pageBlockTable value="{!lstacc}" var="lacc">
<apex:column headerValue="Name" headerClass="clsCenter">
<apex:commandLink value="{!}" onclick="show('{!}'); return false;"/>
<apex:column value="{!lacc.type}"/>

Written by 

2x Salesforce MVP | Platform Champion | 18x Salesforce Certified | MuleSoft Certified | 8x Trailhead Ranger | TechForce Services | Sydney | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *