RadMenu Backcolor

5 posts, 0 answers
  1. Brent
    Brent avatar
    3 posts
    Member since:
    Apr 2013

    Posted 07 May 2013 Link to this post

    I've just read a thread on how to change the back color of a menu item in a Windows app but how do you do it in a Web application?

    If I select the control in the designer I just get Edit Templates or Edit Items and the Skin is set to default.

    I can alter the items okay I just can't alter the background color of the actual bar itself.  It always ends up being the dark silvery color!
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 May 2013 Link to this post

    Hi Brent,

    I guess you need to change the background-color of the RadMenu Item. Please override the default CSS as follows.

    CSS:
    <style type="text/css">
        .RadMenu .rmText
        {
            background-color: Yellow !important;
        }
    </style>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brent
    Brent avatar
    3 posts
    Member since:
    Apr 2013

    Posted 08 May 2013 Link to this post

    oh no that is way too easy.

    What I want to change is the actual background that the items sit on.

    That lovely silvery-gray bar on the attached png, that's what I want to change and at the moment the only way I can find to change it is by choosing a skin!
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 10 May 2013 Link to this post

    Hello,

    Since the background color of the RadMenu control is loaded from a sprite image that comes with our resource file, I would suggest to using the following workaround:
    //css
    <style type="text/css">
            html .RadMenu .rmRootGroup {
                background-image: none;
            }
     
            html .RadMenu ul.rmRootGroup {
                background-color: yellow;
            }
        </style>

    The code snippet above will stop loading the default image for your RadMenu background color and will override it with a yellow color.

    Kind regards,
    Boyan Dimitrov
    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.
  6. Brent
    Brent avatar
    3 posts
    Member since:
    Apr 2013

    Posted 10 May 2013 Link to this post

    That's the one...and actually I had a look at the source code in the browser and it all became obvious.

    Much appreciated.  Good choice of color though...I like yellow!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017