Thursday, 25 January 2018



Color code for PageBlockSection Title Bar in Salesforce


Below is the code for color coding PageBlockSection title bar

<apex:page >
    <style>
        body .bPageBlock .pbBody .red .pbSubheader{
            background-color:red;
        }
        body .bPageBlock .pbBody .grey .pbSubheader{
            background-color:green;
        }          
    </style>
    <apex:pageBlock > 
   <center><h1> Color code for PageBlockSection Title Bar </h1></center><br/>
        <apex:outputPanel styleClass="red" layout="block">
            <apex:pageBlockSection title="first pbs title" id="pb1">
                first section 
            </apex:pageBlockSection>
        </apex:outputPanel>
        <apex:outputPanel styleClass="grey" layout="block">
            <apex:pageBlockSection title="second pbs title" id="pb2">
                second section
            </apex:pageBlockSection>
        </apex:outputPanel>
    </apex:pageBlock>
</apex:page>

Screen shot:



Hope above info might be helpful :-)

No comments:

Post a Comment

Tools for Lightning Web Component Development

 Below are the tools required for Web Component Development 1. Chrome Browser (Prefered) You can download it from Google 2. Visual Studio Co...