Center Radmenu

8 posts, 0 answers
  1. sircutbreaker
    sircutbreaker avatar
    111 posts
    Member since:
    Oct 2007

    Posted 20 Dec 2008 Link to this post

    I have a RadMenu and i have the width set to 100%...

    but I would like to center the actual menu where the buttons are active... and still have the menu expand as you add items to it
    (It's dynamic and depending on users role, certain menuitems are added / subtracted..)

    http://gatewayqsecurity.com/home

    if you look at the page, you will see what I am talking about.

    All the items in the radmenu are to the left..

    How to center them? and keep the 100% status..


    Thanks!

    Jeff
  2. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 22 Dec 2008 Link to this post

    Hello Jeffrey,

    To center the whole menu and apply the same background to the whole line, you should override some of the RadMenu CSS classes:
    div.RadMenu_Black 
        background#383838 url(<%=WebResource("Telerik.Web.UI.Skins.Black.Menu.Background.gif")%>) repeat-x top left
        text-aligncenter
     
    div.RadMenu ul.rmRootGroup 
        display:inline-block
     
    *+html div.RadMenu ul.rmRootGroup /* IE7 */ 
        display:inline
     
    * html div.RadMenu ul.rmRootGroup /* IE6 */ 
        display:inline
     
    div.RadMenu ul.rmHorizontal 
        floatnone

    Kind regards,
    Kamen Bundev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Scott
    Scott avatar
    13 posts
    Member since:
    Dec 2008

    Posted 06 Oct 2010 Link to this post

    I'm able to override the styles as indicated above and it works fine in IE, but the menu items are still left-aligned in Firefox 3.6.10.  Is there any way to achieve the same thing in FireFox?
  5. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 12 Oct 2010 Link to this post

    Hello Scott,

    You may have some global CSS that may affect your text-alignment in Firefox. Can you show a live URL of your site where I can reproduce this issue and help you fix it? You can open a support ticket if you need the privacy, just make sure to refer to this post..

    Regards,
    Kamen Bundev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Scott
    Scott avatar
    13 posts
    Member since:
    Dec 2008

    Posted 12 Oct 2010 Link to this post

    Kamen,

    That's exactly what the problem was.  I was able to find the CSS that was overriding the text alignment in FireFox and resolved the issue.  Thanks for your reply.
  7. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 01 Jan 2011 Link to this post

    My CSS is located in an external CSS file, so the url('<%=WebResource("Telerik.Web.UI.Skins.Telerik.Menu.Background.gif")%>') is not evaluating.  How can I fix this?
  8. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 04 Jan 2011 Link to this post

    Helllo msigman,

    Add it to one of your ASP pages and see what url it generates, then copy it to your external css file.
  9. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 05 Jan 2011 Link to this post

    Hello msigman,

    The generated URL may change, you can replace the image URL in the CSS with the URL to your external corresponding image, for instance url('Menu/Background.gif') if you kept the skin structure. If you don't have this image, tell me which version of RadControls for ASP.NET AJAX and which skin you're using and I will attach it here.

    Best wishes,
    Kamen Bundev
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017