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

Selected tab and hover off problem

1 Answer 172 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Samantha
Top achievements
Rank 1
Samantha asked on 19 Oct 2011, 05:50 PM
I am having a problem when I hover off the selected tab, it reverts to the standard, non-selected css class.  When the page loads the selected tab has a yellow background image, the other tabs have a blue background.  When I hover over the selected tab it remains yellow, when I move the mouse off the selected tab (hover off) its background becomes blue.

Here's the code:

Code behind:
RadTab tab = new RadTab();
                tabStripMain.Tabs.Add(tab);
 
                switch (myswitch)
                {
                    case 1:
                         tab.Text = node.SelectSingleNode("TAB_TITLE").ChildNodes[0].Value;
                         tab.Font.Size = 12;
                         tab.CssClass = "results_tab_off";
                         tab.SelectedCssClass = "results_tab_on";
                         tab.HoveredCssClass = "results_tab_on";
break;
                    default:
                        tabStripMain.EnableEmbeddedSkins = true;
                        tabStripMain.Skin = "Outlook";
                    break;
 
                }

And the css:

.results_tab_off
{
    background:white url(/images/medica/results_tab_off.png) no-repeat 0 100%;
    height: 40px;
    width: 211px;
    color: White;
    padding: 10px 0px 0px 0px !important;
    text-align: left !important;
    border-left: 1px solid white;
}
 
.results_tab_on
{
    background:white url(/images/medica/results_tab_on.png) no-repeat 0 100%;
    height: 40px;
    width: 211px;
    color: #999;
    padding: 10px 0px 0px 0px !important;
    text-align: left !important;
    border-left: 1px solid white;
}
 
.RadTabStrip .rtsTxt {
   padding-left: 5px !important;
   padding-top: 13px !important;

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 24 Oct 2011, 11:33 AM
Hi Samantha,

I tried to reproduce the appearance that you describe but I get very odd look when I set the css classes that you use in your scenario(see the attached image). can you please send us either a live url or a simplified runnable project that we can test locally and help you out with the desired look(no need to use databind, only a simple markup for testing purpose would be sufficient).

Regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
TabStrip
Asked by
Samantha
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or