2016-01-06 68 views
0

我正在使用MVC5和Bootstrap,并且下面的代码产生了一个标签和一个复选框。我想将复选框对齐到div的右侧。是否有这样的引导类?或者我如何在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> 

回答

6

在bootstrap中有一个类“pull-right”,试试看。

+1

简单!谢谢。 – Sun