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

custom stylesheet is not recognised in visualforce

I am using a custom stylesheet to reference a tabstyle in visula force page. the custom style sheet is available in static resources but then also i am getting error messages as below


Error: Invalid tabStyle 'TestStyles__tab' specified.


code attached below.


<apex:page standardController="Position__c" tabStyle="TestStyles__tab">
<apex:form >
<apex:pageBlock title="My Content" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
<apex:pageBlockSection title="My Content Section" columns="2">
<apex:inputField value="{!}"/>
<apex:inputField value="{!Position__c.Location__c}"/>




is "TestStyles__tab" a visualforce tab?


If no, you can give any salesforce object Name or visualforce Tab as a value to "tabValue" attribute.


If TestStyles is a custom object you can directly use tabStyle="TestStyles__c "


Hi hasha,


Thanks for the reply.


Yeah custom object as stylesheet is working but my scenario is i have my own customised CSS sheet. I wanted to add that to my visual force. as per the tutorial, it was mentioned as i need to add it along with "__tab" to the stylesheet name. but it is not working.