This is a migrated thread and some comments may be shown as answers.

Colored Tabs

1 Answer 48 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 26 Jan 2011, 08:17 PM
I'd like to color each tab in a tab strip differently, how might I do this?

For example, a red tab, a blue tab, a green tab...etc.  The tab and the page from the multipage would be the same color.

I have been using the Office2007 theme, one problem I have with this theme and what I want to do is that all the tabs are transparent except the selected one.  Only the selected one has a lighter blue outline.  In Visual Studio, all the tab outlines are shown.  Ideally, I'm fine with Office2007 look but I need to be able to color each of the tabs differently.

Michael Grant

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Jan 2011, 06:35 AM
Hello Michael,

Since RadStrip uses images, we cannot apply the color directly for the selectedTabs. One suggestion is to create custum images and try overriding the default CSS. Here is the sample CSS.

CSS:
.rtsSelected, .rtsSelected span
        {
           background:url(../Images/btnUpdate.jpg) no-repeat 0 100%  !important;
        }

Or you can use selectedClass to define your own CSS class.
<telerik:RadTab Text="Home" Width="150px"  ForeColor="Aqua"  CssClass="myTab" SelectedCssClass="SelectedTab" >
</telerik:RadTab>

corresponding CSS:
.SelectedTab//setting style for selected tab
       {
            background-color:Red!important;
            background-image:none!important;
       }
.myTab//setting style for tabstrip
        {
            background-color:Red!important;
        }

Please refer the documentation for more on Setting the CSS Class of Tabs
Thanks,
Shinu.
Tags
TabStrip
Asked by
Michael
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or