+ Start a Discussion
sdevelopersdeveloper 

Change Background Color of tabs

I am able to get the tabbed layout on my accounts in Salesforce, however The entire body of the detail is now grey as well, and I would like it to be white still.  I've tried to add bgcolor commands but none of them seem to affect anything.  Can someone else me please?

 

<apex:page standardController="Account" showHeader="true" 
      tabStyle="account">
    <style>
.activeTab {background-color:#236FBD; 
                  color:white; 
                  tab-color:yellow;
                  background-image:none}
      .inactiveTab {background-color:white; 
                    color:black; 
                    background-image:none}
         
   </style>
   <apex:tabPanel switchType="client" selectedTab="tabdetails" 
                  id="AccountTabPanel" tabClass="activeTab" 
                  inactiveTabClass="inactiveTab">   
      <apex:tab label="Details" name="AccDetails" id="tabdetails">
         <apex:detail relatedList="false" title="true"/>
      </apex:tab>
      <apex:tab label="Contacts" name="Contacts" id="tabContact">
         <apex:relatedList subject="{!account}" list="contacts" />
      </apex:tab>
      <apex:tab label="Opportunities" name="Opportunities" 
                id="tabOpp">
         <apex:relatedList subject="{!account}" 
                           list="opportunities" />
      </apex:tab>
      <apex:tab label="Open Activities" name="OpenActivities" 
                id="tabOpenAct">
         <apex:relatedList subject="{!account}" 
                           list="OpenActivities" />
      </apex:tab>
      <apex:tab label="Notes and Attachments" 
                name="NotesAndAttachments" id="tabNoteAtt">
         <apex:relatedList subject="{!account}" 
                           list="NotesAndAttachments" />
      </apex:tab>
   </apex:tabPanel>
   
</apex:page>

 

AJSFDCAJSFDC

Include style="background-color:white;" attribute in the apex:tab. Check the below updated line.

 

<apex:tab label="Details" name="AccDetails" id="tabdetails" style="background-color:white;">

 

Cheers,

J

 

 

sdevelopersdeveloper

Thank you so much!