Styling Pages that Use Standard Controllers

Any page associated with a standard controller automatically inherits the style that is used for standard Salesforce pages associated with the specified object. That is, the tab for the specified object appears selected, and the associated color of the tab is used to style all page elements.

You can override the styling of a page that uses a standard controller with the tabStyle attribute on the <apex:page> tag. For example, the following page uses the Account standard controller, but renders a page that highlights the Opportunities tab and uses the Opportunity tab's yellow coloring:

<apex:page standardController="Account" tabStyle="Opportunity">
</apex:page>
To use the styling associated with MyCustomObject:
<apex:page standardController="Account" tabStyle="MyCustomObject__c">
</apex:page>
To use the styling associated with a custom Visualforce tab, set the attribute to the name (not label) of the tab followed by a double-underscore and the word tab. For example, to use the styling of a Visualforce tab with the name Source and a label Sources, use:
<apex:page standardController="Account" tabStyle="Source__tab">
</apex:page>

Alternatively, you can override standard controller page styles with your own custom stylesheets and inline styles.

© Copyright 2000–2014 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.