Steve LaForge
Top achievements
Rank 1
Steve LaForge
asked on 19 Mar 2008, 01:46 PM
Is there an easy way to add a beginning and ending image to a horizontal menu? I would like to have a curved image on both ends to smooth the look of the menu. My menu is inside of a table <td> element.
I tried:
<img src=...>
<telerik:radMenu ...>
<img src=...>
but when opened in IE I see the two images on one line, followed by the menu on a separate line immediately below it.
Any help will be very much appreciated!
Steve
I tried:
<img src=...>
<telerik:radMenu ...>
<img src=...>
but when opened in IE I see the two images on one line, followed by the menu on a separate line immediately below it.
Any help will be very much appreciated!
Steve
4 Answers, 1 is accepted
0
Hello Steve LaForge,
By default RadMenu is rendered as a DIV tag whose "float" CSS attribute is set to "left". This is the reason for the strange behavior you are experiencing. Please try "floating" your images to the left as well:
<img style="float:left" ... />
<rad:RadMenu ... />
<img style="float:left" ... />
I hope this helps,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
By default RadMenu is rendered as a DIV tag whose "float" CSS attribute is set to "left". This is the reason for the strange behavior you are experiencing. Please try "floating" your images to the left as well:
<img style="float:left" ... />
<rad:RadMenu ... />
<img style="float:left" ... />
I hope this helps,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Steve LaForge
Top achievements
Rank 1
answered on 20 Mar 2008, 01:12 PM
The solution that you provided is perfect! Thank you!
0
Virgil Rodriguez
Top achievements
Rank 1
answered on 05 Feb 2009, 04:41 PM
Hello Telerik Team.
Steve needed to put an image before and after the RadMenu. I need to ADD an image beside a RadMenuItem without using the RadMenuItem's ImageUrl property or the other properties that allow me to put an image on a menu item.
I am able to do this for the root level menu by using:
However, the added image is positioned below the menu item not beside. And the added image doesn't even appear for a menu item's child menu.
How can I achieve this?
Thanks in advance.
Virgil
Steve needed to put an image before and after the RadMenu. I need to ADD an image beside a RadMenuItem without using the RadMenuItem's ImageUrl property or the other properties that allow me to put an image on a menu item.
I am able to do this for the root level menu by using:
Dim imgImage As Image = New Image |
imgImage.ImageUrl = "../images/editicon.img" |
mnuItem.Parent.Controls.Add(imgImage) |
How can I achieve this?
Thanks in advance.
Virgil
0
Virgil Rodriguez
Top achievements
Rank 1
answered on 05 Feb 2009, 05:14 PM
In addition to my post above, I would like to add that if I use the following:
mnuItem.Controls.Add(imgImage) |
instead of this:
mnuItem.Parent.Controls.Add(imgImage) |
The menu item's text disappears and only the newly added image is shown.
How can I resolve this?
Thanks again.
Virgil