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

Change Menu Item Color

3 Answers 127 Views
Menu
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 04 May 2012, 12:23 PM
I have a menu of requirements and I want to change the text or background color for requirements that are no longer current.

How can I do this in code behind?

3 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 07 May 2012, 10:41 AM
Hi John,

Can you clarify if you need to change the background color of the child items or the root items of the RadMenu control?

Kind 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.
0
John
Top achievements
Rank 1
answered on 07 May 2012, 11:20 AM
The root items...
0
Kate
Telerik team
answered on 08 May 2012, 11:45 AM
Hi John,

To change the background color of the menu root item you can use the following css class selector:
div.RadMenu_Default .rmRootGroup
       {
           background-color: red;
           background-position: 0 -458px;
           border: 0px solid #828282;
       }

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.
CaseNet
Top achievements
Rank 1
commented on 15 Jun 2021, 08:53 AM

Hi Kate,
How to dynamic background-color of mrRootGroup, mrItem?
Vessy
Telerik team
commented on 17 Jun 2021, 02:16 PM

Hello,

Can you, please, elaborate on the exact dynamic background you want to achieve?

Basically, you can define a CSSClass for each menu item and set it a custom CSS style by cascading through it.

You can control the color of the nested rmItem elements in a similar way:

    <style>
        div.RadMenu_Default .rmRootGroup {
            background-color: red;
            background-position: 0 -458px;
            border: 0px solid #828282;
        }

        div.RadMenu_Default  .rmGroup .rmItem{
            background-color: green;
            background-position: 0 -458px;
            border: 0px solid #828282;
        }
    </style>
Tags
Menu
Asked by
John
Top achievements
Rank 1
Answers by
Kate
Telerik team
John
Top achievements
Rank 1
Share this question
or