Vertical Menu Text Align Problem

2 posts, 1 answers
  1. Dharmesh Barochia
    Dharmesh Barochia avatar
    61 posts
    Member since:
    Jun 2009

    Posted 07 Jul 2009 Link to this post

    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"] ;

    }

  2. Answer
    Yana
    Admin
    Yana avatar
    4850 posts

    Posted 09 Jul 2009 Link to this post

    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.
Back to Top