You need to sign in to do that
Don't have an account?
How to change the color of the <apex:pageBlockSection>
Hello,
Can someone help me with chaning the contrast of the <apex:pageBlockSection>? As you can see from the image, the contrast makes the title hard to read.
Thanks!

Can someone help me with chaning the contrast of the <apex:pageBlockSection>? As you can see from the image, the contrast makes the title hard to read.
Thanks!
https://developer.salesforce.com/forums?id=906F000000098qMIAQ
Hope this helps.
All Answers
https://developer.salesforce.com/forums?id=906F000000098qMIAQ
Hope this helps.
Hope this will help You..
he following function takes the pageBlockSection and the desired colour then adds that colour to HTML element as a background-color. function colorPageBlock(pageblock, color) { if (pageblock != null) pageblock.firstChild.style.cssText = "background-color: " + color + ";"; }
This is the result:
Vf Page:
<pre>
<apex:page standardController="Account">
<script>
function colorPageBlock(pageblock, color) {
if (pageblock != null) pageblock.firstChild.style.cssText = “background-color: ” + color + “;”;
}
</script>
<apex:form>
<apex:pageBlock title="My Content" mode="detail">
<apex:pageBlockSection id="redSection" title="My Content Section" columns="2">
<apex:inputField value="{!account.name}"/>
<script>colorPageBlock(document.getElementById("{!$Component.redSection}"), "red");</script>
</apex:pageBlockSection>
<apex:pageBlockSection id="greenSection" title="My Content Section" columns="2">
<apex:inputField value="{!account.name}"/>
<script>colorPageBlock(document.getElementById("{!$Component.greenSection}"), "green");</script>
</apex:pageBlockSection>
<apex:pageBlockSection id="orangeSection" title="My Content Section" columns="2">
<apex:inputField value="{!account.name}"/>
<script>colorPageBlock(document.getElementById("{!$Component.orangeSection}"), "orange");</script>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
</pre>
Thanks,
Rockzz
When I applied your solution, here is what I get per the screenshot below. Do I need to add something to the VR coding to disable the current stylesheet?