Нижний колонтитул скользит вверх только на одной странице.(Эта страница содержит данные SQL, и нижний колонтитул, кажется, игнорирует это) - PullRequest
1 голос
/ 14 июня 2019

У меня есть приложение MVC, которое имеет примерно 10 различных представлений. Нижний колонтитул действует так, как я ожидал, на каждой странице, кроме одной. В частности, это представление отображает таблицу, содержащую данные SQL. Я считаю, что проблема может быть связана с тем, что нижний колонтитул игнорирует или не видит эту таблицу.

Страница макета:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Pay Data</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
</head>

<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                @Html.ActionLink("MyPay Data", "Index", "Dashboard", new { area = "" }, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">

                <ul class="nav navbar-nav">
                    <li>@Html.ActionLink("Pay Period", "PayPeriod", "Dashboard")</li>
                    <li>@Html.ActionLink("Internal Job Postings", "JobPostings", "Dashboard")</li>
                    <li>@Html.ActionLink("View Paycheck", "ViewPayCheck", "Dashboard")</li>
                    <li>@Html.ActionLink("LOGOUT", "Logout", "Dashboard", new { @class = "log-button" })</li>
                </ul>
            </div>
        </div>
    </div>
    <div class="container body-content">
        @RenderBody()
        <footer>
            <div class="footer-wrapper">
                <div class="footer-content">
                    <div class="copyright-left">
                        Copyright &copy; @DateTime.Now.Year All Rights Reserved.
                    </div>
                </div>
            </div>
        </footer>
    </div>
</body>
</html>

Вид:

@model MyPayTC.Models.ServiceGroupConglom
@{
    Layout = "~/Views/Shared/_LayoutDashboard.cshtml";

    if (Session["userID"] == null)
    {
        Response.Redirect("~/Home/Login");
    }
}
<body>
    <div class="paycheck-table-container">
        @using (Html.BeginForm("ViewPayCheck", "Dashboard", FormMethod.Post))
        {
        <table id="paycheck-table">
            @foreach (var item in Model.ListOfServiceGroups)
            {
                <thead>
                    <tr>
                        <td id="service-name" colspan="4">
                            @item.service
                        </td>
                    </tr>
                    <tr>
                        <td id="service-duration">
                            <b>Duration: </b>@item.duration
                        </td>
                        <td id="service-rate">
                            <b>Rate: </b>$@item.rate
                        </td>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var service in item.ListOfServices)
                    {
                        <tr>
                            <td>
                                @service.serviceDate.ToShortDateString()
                            </td>
                            <td>
                                @service.units
                            </td>
                        </tr>
                    }
                    <tr>
                        <td>
                            <u><b>Total Units: </b>$@item.TotalUnits</u>
                        </td>
                    </tr>
                </tbody>
                }   
            <tfoot>
                <tr>
                    <td colspan="4">
                         <b>Your Pay Before Deductions: @Model.TotalPayBeforeDeductions</b>
                    </td>
                </tr>
            </tfoot>
        </table>
        }
    </div>
</body>

StyleSheet:

.footer-wrapper {
    height: 100px;
    background-color: rgb(20, 20, 23);
    width:100vw;
    left:0px;
    position:absolute;
    min-width:600px;
}

.footer-content {
    width: 100%;
    line-height:100px;
    padding-left: 15px;
    padding-right: 15px;
    margin-right: auto;
    margin-left: auto;
    color:rgba(255,255,255,0.2);
}
...