使用Bootstrap将CheckBox右对齐 [英] Align CheckBox to the right using Bootstrap
本文介绍了使用Bootstrap将CheckBox右对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用MVC5和Bootstrap,并且我具有以下代码,其中包含一个标签和一个复选框.我想将其右边的复选框对齐.是否有一个引导类?或者如何在CSS中做到这一点?
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>
推荐答案
引导程序中有一个"pull-right"类,请尝试一下.
There is a class "pull-right" in bootstrap, try this out.
这篇关于使用Bootstrap将CheckBox右对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文