Centering a menu horizontally

2 posts, 0 answers
  1. Clive Hoggar
    Clive Hoggar avatar
    349 posts
    Member since:
    Nov 2008

    Posted 16 Aug 2010 Link to this post

    I am surprising difficulty in centering the top level buttons on a horizontal menu.

    The menu is in a table row of 850px, but the buttons do not fill the row.
    Visual Studio shows them as desired centered vs the menu bar background, but when I view
    in a browser, the buttons are all grouped to the left.

    I have the following in the declaration:
    <div style="text-align:center; padding-top:0px; margin-top:0px">
      
    <telerik:RadMenu ID="RadMenu1" Runat="server" Skin="Black"   CausesValidation="False" DefaultGroupSettings-Flow="Vertical" width="850px">
      
                        <Items>
                            <telerik:RadMenuItem runat="server" Text="HOME" 
                                NavigateUrl="~/Default.aspx">
                            </telerik:RadMenuItem>
      
    etc etc

    Please advise how I can get the buttons to be centred!

    Thanks

    Clive
  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 17 Aug 2010 Link to this post

    Hey Clive,

    Are you asking how to center align the entire menu inside of the div element? If so, try adding Style="margin: 0 auto;" on your RadMenu control.

    I hope that helps.
Back to Top