how to set the font size of section header on visualforce page, similar size to a Related List. the VF page which i created is a related to account, the font size of section header is looking to big so how to set the size similar to other objects

  • Are you talking about the <apex:sectionHeader/> standard component here, or the title of an <apex:pageBlockSection /> Commented Nov 12, 2012 at 12:01
  • salesforce.com/us/developer/docs/pages/Content/… <apex:sectionHeader/> is referenced i dont think we have any way. Commented Nov 12, 2012 at 12:04
  • about <apex:sectionHeader/> Commented Nov 12, 2012 at 12:05
  • Just be careful before you implement anything to do this and make sure it is really what you need/want. If you change the font-size of the <apex:sectionHeader/> then your VF page will not have the same look and feel as your non VF pages and your app/pages may look out of place. A benefit of using the <apex:sectionHeader/> is that it abstracts away the fine-grained details and you get the consistent look and feel "for free". Commented Nov 12, 2012 at 13:04

1 Answer 1


The only way that I know of to achieve this is the unsupported mechanism of examining the source of the page, finding the styles that are applied to generate the text and then overriding these in your own style block at the top of the page.

E.g. I have the following in one of my pages:

<apex:sectionHeader title="Account Search"/>

and I can change the font size of this using:

  body .bPageTitle .ptBody h1.noSecondHeader{
    font-size: 6px;

This is very fragile though, as if Salesforce change the styles associated with this element, or the page is changed to add a subtitle, it will break. I'd therefore be hesitant to recommend using this mechanism. That said, if its something that is absolutely required and the risk is understood, it is an option.

You could also look at creating your own version of this component, but I think this would also be fragile in that you would have to hardcode the image and if that was changed via configuration then the fact that it didn't change on your page might be an issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .