问题
I'm using MVC5 and Bootstrap and I have the following code with produces a label and a checkbox. I want to align the checkbox to the right of it's div. Is there a bootstrap class for this? Or how do I do it in CSS?
<div class="form-group">
@Html.LabelFor(model => model.Use_Address, htmlAttributes: new { @class = "control-label col-md-3" })
<div class="col-md-9">
<div class="checkbox">
@Html.CheckBoxFor(model => model.Site.Use_Address, new { id = "checkUseAddress" })
</div>
</div>
</div>
回答1:
There is a class "pull-right" in bootstrap, try this out.
来源:https://stackoverflow.com/questions/34636308/align-checkbox-to-the-right-using-bootstrap