Thanks!
답변 4개
The color of the PageBlock/Sections are inherited from the Tab. This means that if you set the tabStyle property of the VF Page say like this -
..... tabStyle="Lead" ....
So now, you'll notice that the Lead tab gets highlighted while viewing the Page and the style(coloring) looks similar to that you see on the Lead page -
Similarly, you can set it to Custom Objectstoo like say -
..... tabStyle="Bookmark__c" ....
You can even apply tabStyle separately your PageBlock like this -
<apex:page tabStyle="Bookmark__c">
<apex:pageBlock title="Page Block Title Here" mode="edit" tabStyle="Lead">
<apex:pageBlockSection title="Page Block Section Title Here">
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
Here the tabStyle of the page goes to a
Custom Object while the tabStyle of the pageBlock points to that of the Leadobject.
So in essence you can create a VF Tab(set the color scheme for that) and the VF Page should inherit automatically. This is cleaner way that overriding the CSS.