Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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>
Posted
Updated 23-Jan-14 20:34pm
v2
Comments
JoCodes 24-Jan-14 2:35am    
You mean to say the menu should appear from the right side of the page?
Member 10523130 24-Jan-14 2:43am    
yes..menu should appear to the right side of page.what shud i do?
JoCodes 24-Jan-14 2:45am    
Check the solution I have added

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


for more detail refer:-
http://jsfiddle.net/VA7ya/1/[^]
 
Share this answer
 
Comments
Karthik_Mahalingam 24-Jan-14 3:39am    
5
TrushnaK 24-Jan-14 5:04am    
thanks karthik..
Add dir attribute to your Div

dir="rtl"


And if dont need space remove reduce the space given in

<dynamicmenuitemstyle itemspacing="7px" />
 
Share this answer
 
v2
Comments
Member 10523130 24-Jan-14 2:45am    
i tried..It is not working..what is mean by rt1?
JoCodes 24-Jan-14 2:48am    
Add like this <div class="nav" dir="rtl"> . rtl means right align . I had tested it and its working. If not working , remove the class nav for time being since it might be left aligned

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900