Try Now
More in this section

Forums / Designing with Sitefinity / Space between root menu

Space between root menu

2 posts, 0 answered
  1. Salman
    Salman avatar
    18 posts
    07 Nov 2007
    27 Feb 2008
    Link to this post

    Dear Gerogi,
    I am using RADMenu control on Sitefinity pages. Initially, i had defined 5 Root Menu Groups in the menu and it looked fine. Now, i had to add  3 more Root Menu Groups making a total of 8. Now, only 6 Root Menu Groups (Level 1) are shown in one row but other 2 are shown in 2nd row.

    I want to show all Root Menu Groups in one row. I can see that there is some standard horizontal space between each root menu. If we can reduce that space then all 8 root menus can be shown in one row. Can you please guide me how to do that?

    I also have a screenshot to explain but in your forums, peoplei can't make attachments with their posts. I think, you should enable this feature by default and it will also help customers to explain their problems.

    Thanks for your time and help.

    Have a good day.

    Best Regards,


  2. Pepi
    Pepi avatar
    981 posts
    28 Oct 2016
    28 Feb 2008
    Link to this post
    Hello Salman,

    I would recommend you wrap the RadMenu in a User Control and implement the following example for stretching all menu items to fill the entire width of the menu:

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="RadMenu.ascx.cs" Inherits="UserControls_RadMenu" %> 
    <%@ Register Assembly="RadMenu.Net2" Namespace="Telerik.WebControls" TagPrefix="radM"%> 
    <script language="javascript" type="text/javascript"
     function JustifyMenu () 
       var menu = <%=RadMenu1.ClientID%>; 
       var width = menu.DomElement.offsetWidth; 
       var singleItemLength = Math.floor(width/menu.Items.length)-1+"px"
      // due to incorrect rounding; 
      // You may need to subtract a larger number depending on 
      // the skin that you are using. 
       for (var i = 0; i < menu.Items.length; i ++) 
          var li = menu.Items[i].DomElement; 
          li.style.width = singleItemLength; 
      window.onresize = window.onload = JustifyMenu; 
    <asp:SiteMapDataSource ID="SitemapDataSource1" runat="server" ShowStartingNode="false" /> 
    <radM:RadMenu ID="RadMenu1" runat="server" DataSourceID="SitemapDataSource1"></radM:RadMenu> 

    If this does not help, please send us the following information:
    1. Your .master page and all related css files.
    2. Skin used for the menu.
    3. Specify the ContentPlaceHolder for the menu in the .master page.

    To attach the necessary files, you need to zip them at first. If you still have problems with the attachments, please open a new support ticket.

    All the best,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered