function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Charu RaniCharu Rani 

How to allign outputfield inside a pageblock table in center

<apex:column headerValue="Weekdays" headerClass="clsCenter">
                    {!dayslst.Day}----------------------------------------> CAN WE MAKE ANY STYLE OR CSS TO PUT THIS TEXT IN THE MIDDLE OF COLUMn IN PAGEBLOCK TABLE
                </apex:column>
                <apex:column headerValue="Start" headerClass="clsCenter">
                <span style="color:red; font-weight: bold ; vertical-align:Center ; horizontal-align:Center">
                    <apex:outputField value="{!timesheet[dayWithApiname[dayslst.Day]]}">--------------------->>>> CAN WE MAKE ANY STYLE OR CSS TO PUT THIS FIELD IN THE MIDDLE OF COLUMn IN PAGEBLOCK TABLE
                        <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
                    </apex:outputField> 
                     </span>
                </apex:column>
hemant ranahemant rana
Thanks guys
Grazitti TeamGrazitti Team
Hi Charu,

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">
<style>
.ct{
text-align:center;
}
</style>
<apex:form id="frm">
<apex:pageBlock title="Accounts Info">
<apex:pageBlockTable value="{!lstacc}" var="lacc">
<apex:column headerValue="Name" headerClass="ct">
<apex:commandLink value="{!lacc.name}" onclick="show('{!lacc.id}'); return false;"/>
</apex:column>
<apex:column value="{!lacc.type}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>


let us know if you have any question .
please don't Forget to Mark this as your best answer if it works fine for you

Regards,
Grazitti Team
Web: www.grazitti.com