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

Changing the Menu Span tags to Divs or Ps

9 Answers 70 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Kevon Hayes
Top achievements
Rank 1
Kevon Hayes asked on 06 Dec 2010, 11:49 PM
I have a menu that width cannot exceed 175px, I have text that need to wrap, which it cannot do in a <span>.  Is it possible to override the render method to change the <span> elements with <div> or <p> in the RadMenu?  This is possible with .NET server controls, using Control Adapters.  How would one do the same with Telerik Control.

9 Answers, 1 is accepted

Sort by
0
Kamen Bundev
Telerik team
answered on 07 Dec 2010, 08:51 AM
Hello Kevon,

Wrapping is usually not an issue with most elements (even spans which in our case are with display: block), however we disable text wrapping inside the menu to provide consistent rendering. Can you describe your use case and provide your RadMenu markup definition and I will be able to help you more. You can also consider using RadMenu root item scrolling - check this demo for more information, but it basically boils down to specifying EnableRootItemScroll="true".

Regards,
Kamen Bundev
the Telerik team
Browse the vast support resources we have to jumpstart 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.
0
Kevon Hayes
Top achievements
Rank 1
answered on 10 Dec 2010, 11:13 AM
Wont changing rootitemscroll to true just add a scroll button to my menu item?  I need my menu items to stay centered and obey the margin/padding styles set.  I added display:block to the rmText class and the menu text still will not wrap.  FYI, I'm using a custom skin built by the Telerik Stylebuilder.  Should I be setting that property on a different class?
0
Accepted
Cori
Top achievements
Rank 2
answered on 10 Dec 2010, 02:36 PM
Hello Kevon,

If you want the text to wrap you need to do this:

.RadMenu .rmText
{
    white-space: noraml !important;
}

That will force the text to wrap for the menu items.

I hope that helps.
0
Kevon Hayes
Top achievements
Rank 1
answered on 10 Dec 2010, 02:57 PM
Thanks Cori. That was supposed to be "normal" that did the trick, and like Ambien it worked like a dream.  ;-)
0
Kamen Bundev
Telerik team
answered on 10 Dec 2010, 03:13 PM
Hi Kevon,

Yes, the property should read white-space: normal. However, please note that only few RadMenu skins have the ability to cope with wrapped subitems, namely Simple, Sitefinity and Web20 skins.

Regards,
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.
0
Kevon Hayes
Top achievements
Rank 1
answered on 10 Dec 2010, 03:53 PM
Yes it looks that way.  So why isn't display:block not wrapping span as it should? 
0
Kamen Bundev
Telerik team
answered on 10 Dec 2010, 04:23 PM
Hi Kevon,

The whole RadMenu has white-space: nowrap; set on it.

Greetings,
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.
0
Kevon Hayes
Top achievements
Rank 1
answered on 10 Dec 2010, 04:42 PM
@ Admin the EnableRootItemScroll has the same effect as "white-space: normal !important;"
0
Kevon Hayes
Top achievements
Rank 1
answered on 10 Dec 2010, 04:54 PM
Didn't want to do this but I just added <br /> tags where needed.  Luckily the menu is fairly static.
Tags
Menu
Asked by
Kevon Hayes
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Kevon Hayes
Top achievements
Rank 1
Cori
Top achievements
Rank 2
Share this question
or