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
Anish Mahadik 1Anish Mahadik 1 

How to apply style to pageblock section in VF page

Hi All,
I am facing difficulty while applying style to pageblocksection.
I tried to used style on pageblocksection but it Pageblocksection color changedidn't worked.

<style>
.custom1 { background-color: red !important; }
.custom3 { background-color: green !important; }
</style>
<apex:pageBlock>
<apex:outputPanel layout="block" styleClass="custom1"> <apex:pageBlockSection title="Section 1"> Content 1 </apex:pageBlockSection>
</apex:outputPanel></apex:pageBlock>
Please see the attached file where i want to apply a style of blue color background to the highted yellow color portion.

Thanks in advance.
 
PriyaPriya (Salesforce Developers) 

Hey Anish,

Kindly refer this link for your requirement :-

https://developer.salesforce.com/forums/?id=906F00000005GaxIAE

https://salesforce.stackexchange.com/questions/88207/how-to-change-color-on-one-particular-pageblocksection

Kindly mark it as the best answer if it helps.

Regards,

Priya Ranjan