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

Centering a menu horizontally

1 Answer 83 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Clive Hoggar
Top achievements
Rank 1
Clive Hoggar asked on 16 Aug 2010, 09:03 PM
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

1 Answer, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 17 Aug 2010, 05:23 PM
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.
Tags
Menu
Asked by
Clive Hoggar
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Share this question
or