Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
how to change WebTab deactive Text color
posted

Hi, as above image, this is my webtab control, first tab is Activetab, 3rd tab is hover tab, other as deactive tabs.

Since color of the text inside deactive tabs make it difficult to read, I wish to change the text color on ig_webtab.css.

As I know igtab_THText will change all tabs text color together,  but didn't found the relative part only for text color on deactive tab..

I am using Infragistic for ASP.Net 2010, version 10.3.20103.2088.

Anyone know how to make it?? Thank !!

Parents
  • 24497
    Verified Answer
    posted

    Hi Cengwah,

    That is correct, if you change css for normal state of tab-item, then it wil affect all other states, until other states have its own css attributes which override normal state.
    Note: those overriden attributes should be located in html after css with normal state: that is just a rule of a browser for priority of conflicting attributes.

    You may modify css directly in the ig_webtab.css (igtab_THText, igtab_THTextHov, igtab_THTextSel, igtab_THTextAct, igtab_THTextDis), but it is more flexible to modify properties of a particular WebTab. Below is example for you.
    Also any tab-item may have its own unique styles. For example, 4th tab changes css only for its main state, but since its class is located after all others, it has highest priority and keeps same attributes for all (hover, selected, etc.) states.

    <style type="text/css">
    .redClr{color:red;}
    .yellowClr{color:yellow;}
    .whiteClr{color:white;}
    .blackClr{color:black;}
    </style>
    ...
    <ig:WebTab ID="WebTab1" runat="server" Width="350px" Height="200px">
      <Tabs>
       <ig:ContentTabItem runat="server" Text="Tab 1"></ig:ContentTabItem>
       <ig:ContentTabItem runat="server" Text="Tab 2"></ig:ContentTabItem>
       <ig:ContentTabItem runat="server" Text="Tab 3"></ig:ContentTabItem>
       <ig:ContentTabItem runat="server" Text="Tab 4">
        <TabCssClasses TextCssClass="blackClr" />
       </ig:ContentTabItem>
      </Tabs>
      <TabItemCssClasses TextActiveCssClass="whiteClr" TextCssClass="redClr" TextHoverCssClass="yellowClr" TextSelectedCssClass="whiteClr" />
    </ig:WebTab>

Reply Children
No Data