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
Attribution to: user1816707
Possible Suggestion/Solution #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:
<style>
body .bPageTitle .ptBody h1.noSecondHeader{
font-size: 6px;
}
</style>
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.
Attribution to: Bob Buzzard
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4286