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

Moving the position of the image in HTML

5 Answers 95 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Dan Hardin
Top achievements
Rank 1
Dan Hardin asked on 03 Nov 2010, 09:28 PM
The HTML we are currently generating through the Telerik menu control looks something like this :

<li class="rmItem">
   <a class="rmLink radMenuLoginReq" href="...">
      <img src="...">
      <span class="rmText rmExpandDown">Menu Item</span>
   </a>
   <div class="rmSlide">
      ...
   </div>
</li>

Is it possible to have the rmText SPAN tag swap places with the IMG tag? I would rather switch the positions of the tags than find the correct way to float the image into the position I want it to be in.

5 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 09 Nov 2010, 02:04 PM
Hello Dan Hardin,

I am afraid that the rendering of RadMenu control cannot be changed.
Maybe if you explain in more details where you want to move the image we will be able to help you?
Additionally – could you please take a look at “Menu/Templates” online demo where a different ways of creating templates and embedding any content inside a RadMenu are presented?

All the best,
Kalina
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
0
Kevon Hayes
Top achievements
Rank 1
answered on 06 Dec 2010, 06:10 PM
Kalina,

What about overriding the render method to change the <span> elements with <div> elements?  This is possible with .NET server controls, how would one do the same with Telerik Controls?
0
Kamen Bundev
Telerik team
answered on 10 Dec 2010, 10:45 AM
Hi Kevon,

Since in RadMenu the SPAN elements sit in A elements, if you replace them with DIV the result will be invalid HTML which some browsers will render wrong (and our skins and scripts do not expect DIV elements there and may fail). Alternatively you can use item templates which directly render DIV elements, but you will lose hovers and selection of the item. Let me know what are you trying to achieve with these DIVs and I will try to help you do it.

Kind 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, 10:57 AM
l simply have a few menu item names that span longer that my menu width.  I'm using a custom menu skin create by the telerik style builder.  I changed the rmText class to display:block but the menu text still will not wrap.
0
Kamen Bundev
Telerik team
answered on 10 Dec 2010, 03:15 PM
Hi Kevon,

The wrapping is disabled on purpose for the whole RadMenu, you can enable it by setting white-space: normal on the .rmText span element.

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.
Tags
Menu
Asked by
Dan Hardin
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Kevon Hayes
Top achievements
Rank 1
Kamen Bundev
Telerik team
Share this question
or