This is a migrated thread and some comments may be shown as answers.
RadMenu change ImageUrl and HoveredImageUrl
1 Answer 36 Views
This is a migrated thread and some comments may be shown as answers.
Raul
Top achievements
Rank 1
Raul asked on 04 Jul 2011, 03:07 PM
Hello Telerik Team!

I need your help. I am creating a RadMenu where I wanted to take pictures of and ImageURL HoveredImageURL and use the CSS. But I just can not place at least one image using the CssClass RadMenuItem to bring in a single image, code below:
<telerik:RadMenu ID="RadMenu1" Runat="server">
            <Items>
                <telerik:RadMenuItem runat="server" Text="" CssClass="btnimage"   NavigateUrl="~/Default2.aspx" >
                </telerik:RadMenuItem>
            </Items>
</telerik:RadMenu>

The CSS File:

.btnimage
{
    background: url('img/unidades.jpg') no-repeat;
}

Note, I am using in my project "Theme", although a direct link in the css class without a path by Theme, did not work. I tried using also the EnableTheming = "true", but it still fails.

Please help me.

Thank you while

Raul

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 05 Jul 2011, 06:48 AM
Hello Raul,

You can set the ImageUrl and HoveredImageUrl property directly.

aspx:
<telerik:RadMenu ID="RadRM_TopNav" runat="server" Skin="Hay" >
  <Items>
     <telerik:RadMenuItem Width="50px" Text="Root1">
          <Items>
            <telerik:RadMenuItem Text="Item1" HoveredImageUrl="../Images/tabSelected.jpg" ImageUrl="../Images/Refresh.gif">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem Text="Item2">
            </telerik:RadMenuItem>   
          </Items>
     </telerik:RadMenuItem>
  </Items>
</telerik:RadMenu>

Thanks,
Princy.
Tags
Menu
Asked by
Raul
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or