如何将菜单栏中的菜单移至右侧 [英] how to shift menu in the menubar to right

查看:60
本文介绍了如何将菜单栏中的菜单移至右侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了母版页,我使用了菜单项菜单..我想将菜单移到菜单栏的右侧。我也想在菜单名称之间做间距。我该怎么做?请帮忙。

这里是我的代码 -





I have created masterpage and i have used menu items for menu..I want to shift that menus to the right side of menu bar. also i want to do spacing between menu names..How can i do that?pls help.
here is my code-


<div class="nav">

            <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" Width="950px" PathSeparator="|" Height="25px">
                   <dynamichoverstyle width="5px" font-size="Medium" />
                   <dynamicmenuitemstyle itemspacing="7px" />

                   <items>
                       <asp:MenuItem Text="Home" Value="Home" NavigateUrl="~/home.aspx" >
                       <asp:MenuItem Text="About Us" Value="About Us" NavigateUrl="~/aboutus.aspx">
                       <asp:MenuItem Text="Book Types" Value="Book Types" NavigateUrl="~/WebForm1.aspx">
                           <asp:MenuItem Text="Academics & General" Value="acp" NavigateUrl="~/booktype1.aspx">
                           <asp:MenuItem Text="History & Politics" Value="hst" NavigateUrl="~/booktype2.aspx">
                           <asp:MenuItem Text="Art & Design" Value="art" NavigateUrl="~/booktype3.aspx">


                       <asp:MenuItem Text="Events" Value="New Item" NavigateUrl="~/WebForm2.aspx">
                       <asp:MenuItem Text="Competition" Value="event1" NavigateUrl="~/event1.aspx">
                       <asp:MenuItem Text="Book fair" Value="event2" NavigateUrl="~/event2.aspx">

                       <asp:MenuItem Text="Contact Us" Value="Contact Us" NavigateUrl="~/contactus.aspx">
                   </items>
               </div>

推荐答案

在div的nav类中添加css: -

add css in you nav class of div:-
float:right;





更多细节参考: -

http://jsfiddle.net/VA7ya/1/ [ ^ ]


将dir属性添加到您的Div



Add dir attribute to your Div

dir="rtl"





如果不需要空格,请减少
$ b $中给出的空间b



And if dont need space remove reduce the space given in

<dynamicmenuitemstyle itemspacing="7px" />


这篇关于如何将菜单栏中的菜单移至右侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆