In my Project I am working on a few index views that only have a few fields. When the fields are small the label and the checkbox below them never line up. In the code below Active is a checkbox and it is not under its label. How can I get it so the checkbox is centered on its label?
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.BranchName)
</th>
<th>
@Html.DisplayNameFor(model => model.Active)
</th>
<th></th>
</tr>
@foreach (var item in Model.OrderByDescending(m => m.Active).ThenBy(m => m.BranchName))
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.BranchName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Active)
</td>
<td>
@Html.ActionLink("Edit", "EditBranch", new { id=item.BranchId })
</td>
</tr>
}
</table>
Aucun commentaire:
Enregistrer un commentaire