Beginning & Ending Images

5 posts, 0 answers
  1. Steve LaForge
    Steve LaForge avatar
    61 posts
    Member since:
    Feb 2005

    Posted 19 Mar 2008 Link to this post

    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
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 19 Mar 2008 Link to this post

    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
  3. Steve LaForge
    Steve LaForge avatar
    61 posts
    Member since:
    Feb 2005

    Posted 20 Mar 2008 Link to this post

    The solution that you provided is perfect!  Thank you!
  4. Virgil Rodriguez
    Virgil Rodriguez avatar
    82 posts
    Member since:
    Oct 2008

    Posted 05 Feb 2009 Link to this post

    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:

    Dim imgImage As Image = New Image  
    imgImage.ImageUrl = "../images/editicon.img" 
    mnuItem.Parent.Controls.Add(imgImage)  
     
    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
  5. Virgil Rodriguez
    Virgil Rodriguez avatar
    82 posts
    Member since:
    Oct 2008

    Posted 05 Feb 2009 Link to this post

    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

Back to Top