1

you can replicate my problem with this small code snippet.

    <div ID="topcell" runat="server" align="center" style="text-align:center">
   <asp:Menu ID="testmenu" runat="server" Width="300px" Orientation="Horizontal" RenderingMode="List">

    <Items>
    <asp:MenuItem Text="Testing"></asp:MenuItem>
    <asp:MenuItem Text="Testing"></asp:MenuItem>
    <asp:MenuItem Text="Testing"></asp:MenuItem>
    <asp:MenuItem Text="Testing"></asp:MenuItem>
    <asp:MenuItem Text="Testing"></asp:MenuItem>
    <asp:MenuItem Text="Testing"></asp:MenuItem>



    </Items>
   </asp:Menu>
   </div>

Result:

  • Testing-Testing-Testing-Testing-Testing-Testing
  • Testing----------------------------------------

Desired results:

  • Testing-Testing-Testing-Testing-Testing-Testing
  • ------------------Testing----------------------

I have tried all three RenderingModes with no luck! Am I doing something wrong?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
clamchoda
  • 4,411
  • 2
  • 36
  • 74

1 Answers1

0

Try adding following CSS to your page:

<style type="text/css" >
   #testmenu ul li {
      display:inline-block;
      float:none !important;
   }
</style>  

It will overwrite inline menu styles and force the unordered list to center.

Yuriy Galanter
  • 38,833
  • 15
  • 69
  • 136