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

radmenu maintains font color

1 Answer 173 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Patxi
Top achievements
Rank 1
Patxi asked on 20 Mar 2009, 12:42 PM
Hello,

I have set the following property:

.RadMenu_OT .rmLink
{
    color:White;
    border-right:solid 1px black;
}

The problem comes when clicking on an item. I want to change font color. It keeps always the white color.

Do you know how to change it to black for example?

Thank you in advance.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Mar 2009, 01:47 PM
Hello Paxti,

I guess you want to change the font color of selected menu item. Try the following code snippet for applying the style for selected item of RadMenu.

CSS:
<style type="text/css"
.MyClass 
    color :Black !important;     
}     
</style> 

CS:
protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e) 
    RadMenuItem selectItem = (RadMenuItem)e.Item; 
    foreach (RadMenuItem item in RadMenu1.GetAllItems()) 
    { 
        if (selectItem == item) 
        { 
            item.CssClass = "MyClass"
        } 
        else 
        { 
            item.CssClass = ""
        } 
    } 

Thanks,
Shinu.
Tags
Menu
Asked by
Patxi
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or