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

[Solved] How do you use the menu to use image in the upper part and use text which is aligned at the center with the image on top

1 Answer 150 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 31 Oct 2011, 03:53 PM
How do you use the menu to use image in the upper part and use text which is aligned at the center with the image on top

 <table style="width:90%;">
        <tr>
            <td class="style4">
                &nbsp;</td>
            <td class="style2">
                &nbsp;</td>
            <td class="style3">


    <telerik:RadMenu ID="RadMenu1" Runat="server" Skin="" CssClass="CSMBMenu" 
                    EnableRoundedCorners="True" >
        <Items>
            <telerik:RadMenuItem runat="server" CssClass="menu" 
                HoveredImageUrl="~/Images/building_small_cadre.jpg" 
                ImageUrl="~/Images/building_small.jpg" 
                SelectedImageUrl="~/Images/building_small_cadre.jpg" Text="Bâtisses" 
                Width="83px">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" CssClass="menu" 
                HoveredImageUrl="~/Images/locker_small_cadre.jpg" 
                ImageUrl="~/Images/locker_small.jpg" 
                SelectedImageUrl="~/Images/locker_small_cadre.jpg" Text="Casiers" Width="83px">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" CssClass="menu" 
                HoveredImageUrl="~/Images/books_small_cadre.jpg" 
                ImageUrl="~/Images/books_small.jpg" 
                SelectedImageUrl="~/Images/books_small_cadre.jpg" Text="Dictionnaire" 
                Width="83px">
            </telerik:RadMenuItem>
            <telerik:RadMenuItem runat="server" CssClass="menu" 
                HoveredImageUrl="~/Images/security_small_cadre.jpg" 
                ImageUrl="~/Images/security_small.jpg" 
                SelectedImageUrl="~/Images/security_small_cadre.jpg" Text="Accès" Width="83px">
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>
            </td>
            <td></td>
        </tr>
        </table>

Here is the RadMenu but i can't get the text to align in the center, i guess i have to use the right css but dont have a clue on how to do that.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 01 Nov 2011, 09:03 AM
Hello Daniel,

You can try the following CSS:

CSS:
<style type="text/css">
  .RadMenu  .rmText
  {
    display:table-row !important;
    float:left !important;
    margin-left:20px !important;
  }
</style>

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