3 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 23 Dec 2008, 06:01 AM
Hi Gita,
You can change the font-color of RadMenuItems by editing the CSS class .rmText or from server side code.
By adding the CSS:
From code behind:
Thanks,
Princy.
You can change the font-color of RadMenuItems by editing the CSS class .rmText or from server side code.
By adding the CSS:
<style type="text/css"> |
.RadMenu_Default .rmText |
{ |
color:Green !important; |
} |
</style> |
From code behind:
RadMenu1.FindItemByText("RadMenuItem1").ForeColor = System.Drawing.Color.Green; |
Thanks,
Princy.
0
Gita
Top achievements
Rank 1
answered on 23 Dec 2008, 07:19 AM
Hello Princy and thanks for the reply.
It changed the color of ALL Menu items to green. What I need is changing the color of the active menu. For example if all the menus are white, when the client hits the "Services" link and is on the Services page, the color of the menu services to be other than the rest of menu items, lets say to be blue. This is what I meant by active menu (maybe the wrong expression).
Thanks
PS. What about cursor? Once I chnage the cursor: auto, this ist a hand on IE and a Text in Mozilla :(
It changed the color of ALL Menu items to green. What I need is changing the color of the active menu. For example if all the menus are white, when the client hits the "Services" link and is on the Services page, the color of the menu services to be other than the rest of menu items, lets say to be blue. This is what I meant by active menu (maybe the wrong expression).
Thanks
PS. What about cursor? Once I chnage the cursor: auto, this ist a hand on IE and a Text in Mozilla :(
.RadMenu
.rmRootGroup .rmLink:hover,
.RadMenu
.rmRootGroup .rmFocused,
.RadMenu
.rmRootGroup .rmExpanded
{
background: transparent;
color: #4f9df3;
cursor: auto;
}
PPS: this is a DNN application. The CSS is on the root directory and it works without giving the .RadMenu a specific name.
0
Princy
Top achievements
Rank 2
answered on 30 Dec 2008, 12:51 PM
Hello Gita,
You can set the forecolor of the active menu item in the code behind as shown below:
cs:
Hope this helps.
Thanks
Princy.
You can set the forecolor of the active menu item in the code behind as shown below:
cs:
protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e) |
{ |
if(e.Item is RadMenuItem) |
{ |
string strtxt = e.Item.Text; |
e.Item.ForeColor = System.Drawing.Color.Red; |
foreach (RadMenuItem item in RadMenu1.Items) |
{ |
if (item.Text != strtxt) |
item.ForeColor = System.Drawing.Color.Empty; |
foreach (RadMenuItem item2 in item.Items) |
{ |
if (item2.Text != strtxt) |
item2.ForeColor = System.Drawing.Color.Empty; |
} |
} |
} |
} |
Thanks
Princy.