YosrJ
YosrJ

Reputation: 121

Need menuitem on the right

I want the logout link to be shown at the extreme right when the other menuitems are hidden.

In fact its showing in the middle .

How I can force it to be in the right.

<div class="nav-content container">
            <div class="nav-wrapper">      
                <ul class="main-nav">
                    <asp:PlaceHolder runat="server" ID="hideNav">
                    <li runat="server" id="home" Visible="false" class="hide"><asp:HyperLink Id="homeLink" runat="server"></asp:HyperLink></li>
                    <li runat="server" id="reportClaim" Visible="False" class="hide"><asp:HyperLink runat="server" NavigateUrl="/reportclaim.aspx" Text="<span>Report Claim</span>" ID="reportClaimLink"></asp:HyperLink></li>
                    <li  id="lnkLogOut1" runat="server" style=" "><asp:HyperLink runat="server"  NavigateUrl="~/LogOut.aspx" Text="<span>Log Out</span>"></asp:HyperLink></li>
                    </asp:PlaceHolder>
                </ul>
            </div>

I tried

.pull-right {
  float: right !important;
} 

but not working

enter image description here

Upvotes: 0

Views: 59

Answers (1)

user3497034
user3497034

Reputation:

Plesase use following code:

<div class="nav-content container" >
        <div class="nav-wrapper" >      
            <ul class="main-nav" >
                <asp:PlaceHolder runat="server" ID="hideNav"> 
                <li runat="server" id="home" Visible="true" class="hide"  ><asp:HyperLink Id="homeLink" runat="server" Text="<span> Claim</span>"></asp:HyperLink></li>
                <li runat="server" id="reportClaim" Visible="true" class="hide"><asp:HyperLink runat="server" NavigateUrl="/reportclaim.aspx" Text="<span>Report Claim</span>" ID="reportClaimLink"></asp:HyperLink></li>

                </asp:PlaceHolder>
            </ul>
        </div>
       <div align="right" style="vertical-align:top">
            <asp:HyperLink ID="HyperLink1" runat="server"  NavigateUrl="~/LogOut.aspx" Text="<span>Log Out</span>"></asp:HyperLink>


</div>

Here you need to create Link button in another Div tag and set align to that div as a right Also we have removed UL & LI tag for Logout Div , I don't think it is required.

Upvotes: 1

Related Questions