You need to sign in to do that
Don't have an account?
DannyK89
pageBlockSection color change
I would like to change the color of one of my pageblocksections. Below is just a sample if what I would like to do. I would like to change the color of the first pageblocksection. I would like to know if this is possible or not.
Thanks.
<apex:page> <apex:form> <apex:pageblock> <apex:pageBlockSection> <apex:pageBlockSection> </apex:pageBlockSection> <apex:pageBlockSection> </apex:pageBlockSection> </apex:pageBlockSection> </apex:pageblock> </apex:form> <apex:page>
Use this style in VF page
<style>
.pbSubheader{
background-color: red !important;
border-color: none !important;
}
</style>
Thanks
This changes all the pageblocksections red. I would like only the first main pageblocksection to be a different color.
Hi Danny,
Please try the folllowing code ,as we dont have any style attribute for apex:pageblockSections we have to write Javascript /JQuery to solve the problem here I have used JQuery.Feel free for further clarifications.....
I tested this out on my page and it seemed to do some weird stuff to my page. Buttons don't seem to work anymore. Also this turned the background of my page to a diffrent color and not the section. I'm not sure when the issue is. Also I found that If I put a value in the tabstyle attribute the code does not work.
Hi Dann,
Please post your page source to check where is the problem..
Here is the code without any javascript