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

SelectedCssClass is not working

2 Answers 105 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
he
Top achievements
Rank 1
he asked on 01 Nov 2010, 09:22 AM
I tried to use custom css class for RadTab, I defined two classes for normal/selected tab
.SelectedTab
{
    font-weight: bold !important;
    background-image: url('../../Images/Navi_Buttons/01_Selected.png');
    background-repeat: no-repeat;
    width: 164px;
    height: 22px;
    text-align: center;
    color: White;
}
.CustomTab
{
    font-weight: bold !important;
    background-image: url('../../Images/Navi_Buttons/02_NotSelected.png');
    background-repeat: no-repeat;
    width: 164px;
    height: 22px;
    text-align: center;
    color: White;
}

and in my aspx, I set the property for tab control
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
                    SelectedIndex="0" Skin="" EnableEmbeddedSkins="false">
                    <Tabs>
                        <telerik:RadTab Text="AAA" SelectedCssClass="SelectedTab" CssClass="CustomTab" >
                        </telerik:RadTab>
                        <telerik:RadTab Text="BBB" SelectedCssClass="SelectedTab" CssClass="CustomTab">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>

All tabs are displayed as CustomTab, and I see in the html, the selected tab has both of SelectedTab and CustomTab
<li class="rtsLI rtsFirst"><a class="rtsLink CustomTab rtsSelected SelectedTab" href="#">

Please help to check it. Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 02 Nov 2010, 08:29 AM
Hello,

Use the !important modifier to override the default settings.
Example below:
CSS:
.SelectedTab
{
    font-weight: bold !important;
    background-image: url('../../Images/Navi_Buttons/01_Selected.png') !important;
    background-repeat: no-repeat !important;
}


Thanks,
Princy.
0
he
Top achievements
Rank 1
answered on 02 Nov 2010, 12:05 PM
Hi Princy

It's working now!!! Thanks a lot !!!!!

Regards
Helin
Tags
TabStrip
Asked by
he
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
he
Top achievements
Rank 1
Share this question
or