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

Vertical Menu Text Align Problem

1 Answer 134 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Dharmesh Barochia
Top achievements
Rank 1
Dharmesh Barochia asked on 07 Jul 2009, 01:55 PM

I used telerik menu to display Icon and text vertically so I have written following code it display Icon and text but text not display in center of the image.

My requirement is that I have to display text in bottom of the image and also it should be in center.

 

<telerik:RadMenu ID="RadMenu1" runat="server" DataSourceID="SiteMapSetup" OnItemDataBound="RadMenu1_ItemDataBound" DataNavigateUrlField="url" Flow="Vertical"   >

</telerik:RadMenu>

 

protected void RadMenu1_ItemDataBound(object sender, Telerik.Web.UI.RadMenuEventArgs e)

{

        SiteMapNode node = (SiteMapNode)e.Item.DataItem;

        e.Item.ImageUrl = node["ImageURL"];

        e.Item.Text ="<br><br><br>" +  node["text"] ;

}

1 Answer, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 09 Jul 2009, 02:39 PM
Hello Dharmesh,

Please add the following css styles to your page:

<style type="text/css">        
    .RadMenu .rmLeftImage { 
        floatnone !important; 
        }       
    .RadMenu .rmVertical .rmLeftImage + .rmText { 
        padding:0 !important;  
    }     
</style> 

Kind regards,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Menu
Asked by
Dharmesh Barochia
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or