Align CheckBox to the right using Bootstrap

女生的网名这么多〃 提交于 2020-01-03 02:52:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!