页脚仅在一页上向上滑动。 (此页面包含sql数据,而页脚似乎忽略了该数据)

时间:2019-06-14 15:46:40

标签: html css asp.net-mvc-4

我有一个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);
}

0 个答案:

没有答案