Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

I have a site: lolacyclingclub.org and if your ar not logged in then the heart logo is not going over the navigation, but if you login then you have more navigation links, and then the heart logo goes over the navigation menu - what ofcource not has to be. Thank you

I have this for_Layout.cshtml:

C#
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" type="image/ico" href="~/favicon.ico">
    
    <title>@ViewBag.Title - Lola Cycling Club</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    @*@Scripts.Render("~/bundles/jqueryval")*@
    @Scripts.Render("~/bundles/scripts")

    <link href="~/Content/fullcalendar.css" rel="stylesheet" />
    <script src="~/Scripts/fullcalendar.js"></script>
    @*<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>*@

   


  
</head>
<body>



    <div class="navbar navbar-inverse navbar-fixed-top">
        @*<div class="container">*@
            @*<div class="navbar-header">*@
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>



                @*@Html.ActionLink("lola", "Index", "Home", null, new { @class = "navbar-brand" })*@



                <div class="col-sm-1">
                    @*<a href="#" class="thumbnail">*@
                    <a href="@Url.Action("Index", "Home")"><img src="~/Images/lcc4 - Copy - Copy.png" class="img-responsive" style="position:relative;  top:10px; right:-50px"  @*height="44" width="90"*@></a>
                    @*</a>*@
                </div>


       


               
                
                @*<img id="img_logoRight" alt="Logo" src="@Url.Content("~/Images/lola_heart.png")" />*@

            @*</div>*@
            <div class="navbar-collapse collapse">
                <br />
                <div class="float-right">
                    @*<section id="login">
                        @Html.Partial("_LoginPartial")
                    </section>*@



                    <div id="menucontainer">
                        <ul class="nav navbar-nav" >

                            <li @if (@ViewContext.RouteData.GetRequiredString("controller") == "Account") { @Html.AttributeEncode("class=active")       ; }>
                                @Html.ActionLink("who", "Index", "Account")
                            </li>

                            <li @if (@ViewContext.RouteData.GetRequiredString("controller") == "What") { @Html.AttributeEncode("class=active")        ; }>
                                @Html.ActionLink("what", "Index", "What")
                            </li>

                            <li @if (@ViewContext.RouteData.GetRequiredString("controller") == "Calendar") { @Html.AttributeEncode("class=active")          ; }>
                                @Html.ActionLink("agenda", "Index", "Calendar")
                            </li>

                            <li @if (@ViewContext.RouteData.GetRequiredString("controller") == "Philosophy") { @Html.AttributeEncode("class=active")           ; }>
                                @Html.ActionLink("philosophy", "Index", "Philosophy")
                            </li>


                            @if (ViewContext.HttpContext.User.IsInRole("Admin"))
                            {
                                <li @if (@ViewContext.RouteData.GetRequiredString("controller") == "Climb") { @Html.AttributeEncode("class=active")             ; }>
                                    @Html.ActionLink("bucket-list", "Index", "Climb")
                                </li>
                            }
                            
                            
                            
                          

                            @*@if (ViewContext.HttpContext.User.IsInRole("Admin"))
                            {
                                <li @if (@ViewContext.RouteData.GetRequiredString("controller") == "Route") { @Html.AttributeEncode("class=active")              ; }>
                                    @Html.ActionLink("ROUTE", "Index", "Route")
                                </li>


                            }*@

                            @if (ViewContext.HttpContext.User.IsInRole("Admin"))
                            {
                                <li @if (@ViewContext.RouteData.GetRequiredString("controller") == "Account") { @Html.AttributeEncode("")               ; }>
                                    @Html.ActionLink("add user", "Register", "Account")
                                </li>


                            }
                            

                            @if (User.Identity.IsAuthenticated)
                            {                         
                             <li> @Html.Partial("_LoginPartial")</li>
                            }
                            
                            @if (User.Identity.IsAuthenticated)
                            {

                            <li>
                                <a href="java<!-- no -->script:document.getElementById('logoutForm').submit()">Log out</a>
                            </li>
                            
                            }                              
                           

                           
                           

                            


                        </ul>

                      
                        <ul class="nav navbar-nav navbar-right">
                            <li>
                            
                                @*<a href="#" class="thumbnail">*@
                                <a href="@Url.Action("Index", "Home")"><img src="~/Images/lola_heart - Copy.png" class="img-responsive"  style=" position:relative; top:-18px; right:120px"></a>
                                @*</a>*@
                            </li>

                           



                        </ul>








                    </div>


                   

                    </div>

            </div>

       

        @*</div>*@

    </div>

    
    <div class="container body-content ">
        @RenderBody()
        @*<hr />*@
        @*<footer>
            <p>© @DateTime.Now.Year - Lola Cycling Club</p>
        </footer>*@
    </div>

    <div id="body">
        @RenderSection("Styles", required: false)
        <div class="body-content ">
        </div>
        </div>

    @*@Scripts.Render("~/bundles/jquery")*@
    @*@Scripts.Render("~/bundles/bootstrap")*@
    @RenderSection("scripts", required: false)
</body>
</html>
Posted

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