一个奇怪的。我正在使用 ASP.NET Core 6、jQuery 和 Bootstrap 4。应用程序中的大多数表的标题与列未对齐。所有标题似乎都位于第一列上方,请参阅此处的屏幕截图:
代码如下:
<table class="table table-bordered table-striped table-hover col-md-12">
<thead>
<tr>
@if ((string)ViewData["Designation"] == "Current")
{
<td class="text-center">Registered (NOT designated)</td>
}
<td class="text-center">Designation Date</td>
<td class="text-center">CoP/CoD Document</td>
<td class="text-center">NSS Finance Customer Code</td>
@if ((string)ViewData["Designation"] == "Current")
{
<td class="text-center">Next Designation Date</td>
<td class="text-center">First Reminder Sent</td>
<td class="text-center">Second Reminder Sent</td>
<td class="text-center">De-designation Notice Sent</td>
}
<td></td>
</tr>
</thead>
<tbody>
@if ((string)ViewData["Designation"] == "All" && Model.RenewalDesignations.Any())
{
foreach (var designation in Model.RenewalDesignations)
{
<tr>
<td class="text-center">@(designation.DesignatedAt.ToString("dd/MM/yyyy"))</td>
<td>
@if (designation.CoDorCoPDocument != null)
{
<a asp-controller="Designation" method="get" asp-action="DownloadCoPorCoD" asp-route-id="@designation.Id" class="btn btn-block btn-outline-info">
Download
</a>
}
</td>
<td class="text-center">@designation.NssFinanceCustomerCode</td>
<td>
@if (User.IsInRole("PHSStaff"))
{
<a asp-controller="Designation" method="get" asp-action="EditDesignation" asp-route-id="@designation.Id" class="btn btn-info btn-block">
Edit
</a>
}
</td>
</tr>
}
}
@if ((string)ViewData["Designation"] == "All" && !Model.RenewalDesignations.Any())
{
<tr>
<td colspan="6">
No previous designation records
</td>
</tr>
}
@if ((string)ViewData["Designation"] == "Current" && (Model.CurrentDesignation != null && !Model.CurrentDesignation.DesignationPending))
{
<tr>
<td class="text-center">
@Model.RegisteredNotDesignatedAt.Date.ToString("dd/MM/yyyy")
</td>
<td class="text-center">
@Model.CurrentDesignation.DesignatedAt.ToString("dd/MM/yyyy")
</td>
<td>
@if (Model.CurrentDesignation.CoDorCoPDocument != null)
{
<a asp-controller="Designation" method="get" asp-action="DownloadCoPorCoD" asp-route-id="@Model.CurrentDesignation.Id" class="btn btn-block btn-outline-info">
Download
</a>
}
else if (Model.CurrentDesignation.ConditionsOfDesignationId > 0)
{
<a class="btn btn-primary btn-block" asp-action="ViewCoD" asp-controller="ConditionsOfDesignation" asp-route-id="@Model.CurrentDesignation.ConditionsOfDesignationId" title="Click to open conditions of designation">
Conditions of Designation
</a>
}
</td>
<td class="text-center">@Model.CurrentDesignation.NssFinanceCustomerCode</td>
<td class="text-center">@Html.Raw(Model.CurrentDesignation.NextDesignationDate().Date > Model.CurrentDesignation.DesignatedAt.Date ? Model.CurrentDesignation.NextDesignationDate().ToString("dd/MM/yyyy") : "")</td>
<td class="text-center">@Html.Raw(Model.CurrentDesignation.FirstRenewalReminderSent ? "Yes" : "No")</td>
<td class="text-center">@Html.Raw(Model.CurrentDesignation.SecondRenewalReminderSent ? "Yes" : "No")</td>
<td class="text-center">@Html.Raw(Model.CurrentDesignation.DesignationLapsedSent ? "Yes" : "No")</td>
<td>
@if (User.IsInRole("PHSStaff"))
{
<a asp-controller="Designation" method="get" asp-action="Designation" asp-route-id="@Model.VaccinationCentreId" class="btn btn-info btn-block">
Edit
</a>
}
</td>
</tr>
}
</tbody>
</table>
不过我还有其他桌子也不错!
任何帮助将不胜感激。
发现问题了。
正在加载一个流氓 .css 文件。
一旦找到并移除,就开始工作。