Asp.net mvc 将mvc核心网页与屏幕开头对齐

Asp.net mvc 将mvc核心网页与屏幕开头对齐,asp.net-mvc,asp.net-core,razor,Asp.net Mvc,Asp.net Core,Razor,我想在屏幕开始时对齐网页内容。我尝试了很多解决方案,但都没有效果。 下图将有助于理解我的问题。 index.cshtml视图如下所示: <div style="height: 100%"> <table class="table align-content-lg-start"> <thead> <tr> <th class="col-1"> @Html.

我想在屏幕开始时对齐网页内容。我尝试了很多解决方案,但都没有效果。 下图将有助于理解我的问题。

index.cshtml视图如下所示:

<div style="height: 100%">
<table class="table  align-content-lg-start">
    <thead>
        <tr>
            <th class="col-1">
                @Html.SortableHeaderFor(model => model.DBId)
            </th>
            <th class="col-1">
                @Html.SortableHeaderFor(model => model.Name)
            </th>
            <th class="col-1">
                @Html.SortableHeaderFor(model => model.NID)
            </th>
            <th class="col-1">
                @Html.SortableHeaderFor(model => model.Address)
            </th>
            <th class="col-5">
                @Html.SortableHeaderFor(model => model.Mobile)
            </th>
        </thead>
        <tbody>
            <td class="col-1">
                    @Html.DisplayFor(modelItem => item.DBId)
            </td>
            <th class="col-1">
                    @Html.DisplayFor(model => model.Name)
            </th>
            <td class="col-1">
                    @Html.DisplayFor(modelItem => item.NID)
            </td>
            <td class="col-1">
                    @Html.DisplayFor(modelItem => item.Address)
            </td>
            <td class="col-5">
                    @Html.DisplayFor(modelItem => item.Mobile)
            </td>
        </tbody>
    </table>
</div>

@SortableHeaderFor(model=>model.DBId)
@SortableHeaderFor(model=>model.Name)
@sortableheader(model=>model.NID)
@sortableheader(model=>model.Address)
@sortableheader(model=>model.Mobile)
@DisplayFor(modelItem=>item.DBId)
@DisplayFor(model=>model.Name)
@DisplayFor(modeleItem=>item.NID)
@DisplayFor(modelItem=>item.Address)
@DisplayFor(modelItem=>item.Mobile)

我假设您正在使用引导。您需要做的是找到class=“container”。并将其更改为“容器流体”