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

how to wrap text only for level 1 menu item?

1 Answer 51 Views
Menu
This is a migrated thread and some comments may be shown as answers.
AUK
Top achievements
Rank 1
AUK asked on 27 Nov 2013, 09:02 AM
how to wrap text only for level 1 menu item? as I don't want to wrap text for the menu sub item, is this possible?

Many thanks

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Nov 2013, 10:06 AM
Hi AUK,

Please have a look into the following code snippet to achieve your scenario.

ASPX:
<telerik:RadMenu ID="RadMenu1" runat="server">
    <Items>
        <telerik:RadMenuItem runat="server" Text="Root Item 1">
            <Items>
                <telerik:RadMenuItem runat="server" Text="This is an extremely long item text that is used to illustrate the use of the CssFile property"
                    CssClass="WrappingItem">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenuItem>
    </Items>
</telerik:RadMenu>

CSS:
<style type="text/css">
    .WrappingItem
    {
        white-space: normal !important;
        background-image: none !important;
    }
    .RadMenu_Default .rmGroup .rmText, .RadMenu_Default .rmVertical .rmText
    {
        background-image: none !important;
    }
</style>

Thanks,
Shinu.
Tags
Menu
Asked by
AUK
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or