+ Start a Discussion
RovRov 

Font color on Tab

Though I have set the color as White for active tab and black for inactive tab, the Font Color on tab is always black. Any thoughts why? I tested it in IE as well as Firefox.

 <style>
      .activeTab {background-color: #919191; color:white; font-size: 9pt; background-image:none}
      .inactiveTab {background-color: #B3B3B3; color:black; font-size: 9pt; background-image:none}
   </style>


<apex:tabPanel switchType="client" selectedTab="tpMain" id="tpMain" tabClass="activeTab" inactiveTabClass="inactiveTab">


Best Answer chosen by Admin (Salesforce Developers) 
osamanosaman

There may be something else thats causing the issue.

 

Try changing color property to color:White !Important

All Answers

osamanosaman

There may be something else thats causing the issue.

 

Try changing color property to color:White !Important

This was selected as the best answer
RovRov

You are right there is perhaps something else that's causing the issue.

I tried color property to color:White !Important this changes the font color of both active and inactive tab to white. 

 

Thanks for your suggestion.

RovRov

osaman, thanks for your help. Finally  I got the desired effect on tab font. As you suggested,setting color property to ! important on both active and inactive tabs did the trick.

 

<style>
.activeTab {background-color: #458B00; color:white!important; font-size: 9pt; background-image:none}
.inactiveTab {background-color: #76EE00; color:black!important; font-size: 9pt; background-image:none}
</style>