Adding Text to the menu

3 posts, 1 answers
  1. Lister Potter
    Lister Potter avatar
    4 posts
    Member since:
    Oct 2009

    Posted 16 Aug 2012 Link to this post

    I would like to add text to the far right of the menu, not a menu, just some information text.  Is this possible?
  2. Answer
    John DeVight
    John DeVight avatar
    209 posts
    Member since:
    Jan 2010

    Posted 17 Aug 2012 Link to this post

    Hi Lister,

    To add text to the far right of a menu, you could add a div with the css style set to float:right.  For example, if I had the following html:
    <ul id="menu">
        <li>Framework
            <ul>
                <li>DataSource</li>
                <li>HierarchicalDataSource</li>
                <li>Model</li>
                <li>Node</li>
                <li>ObservableArray</li>
            </ul>
        </li>
        <li>Web
            <ul>
                <li>AutoComplete</li>
                <li>Calendar</li>
                <li>ComboBox</li>
                <li>DatePicker</li>
                <li>DropDownList</li>
            </ul>
        </li>
    </ul>

    I could initialize the menu and then add a div with some text to float to the far right like this:
    $("#menu").kendoMenu();
    $("<div>Text added to menu</div>")
        .css({
            "float": "right",
            "padding-right":"8px",
            "padding-top":"8px"
        })
        .appendTo("#menu");

    To see an example, you can take a look here: jsFiddle: Kendo UI Adding Text to Menu

    Regards,

    John DeVight

    P.S. - If I answered your question, please mark my response as the answer :-)
  3. Kendo UI is VS 2017 Ready
  4. Lister Potter
    Lister Potter avatar
    4 posts
    Member since:
    Oct 2009

    Posted 06 Sep 2012 Link to this post

    Worked great, Thanks!
Back to Top