Reputation: 1648
So I have some text, an Html.LabelFor on the left, and some raw text (as @Html.DisplayText simply does not work).
I end up with the above awfulness. I've tried to set the div alignment explicitly, to no avail. What am I missing here?
<div class="form-group" style="align-items:center">
@Html.LabelFor(model => model.seniority, htmlAttributes: new { @class = "control-label col-md-2" })
@Model.seniority.ToString()
</div>
Upvotes: 0
Views: 2966
Reputation: 2648
Here is the approach you should use when using bootstrap
<div class="form-group" style="align-items:center">
<div class="col-md-2">
@Html.LabelFor(model => model.seniority)
</div>
<div class="col-md-3">
@Model.seniority
</div>
</div>
Upvotes: 1