below image i marked with red color i need to align the title on center.please can anyone help me out

Vf page:

<apex:page controller="ChartController2" >

<apex:pageblock  title="Members and their Years of experience" mode="maindetail" >

    <apex:chart height="400" width="400" data="{!months}" colorSet="#FFFF00,#FFFF00,#FFFF00,#9ACD32,#9ACD32" >
        <apex:axis type="Numeric" position="left" fields="volume" title="Record Count" />
        <apex:axis type="Category" position="bottom" fields="year" title="Year" />

       <apex:barSeries  orientation="vertical" axis="left" xField="year" yField="volume" colorsProgressWithinSeries="true"  title="Deliveries By Year" />



enter image description here


you cannot directly use the style attribute on pageblock element.. but you can change the existing style using this

text-align : center;

add this style to your page and the text on the page block title should be center aligned.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.