在Bootstrap中,如何让复选框与同一行上的其他文本对齐?复选框始终低于一行文本。我尝试在div中包装单独的文本并添加填充但它什么也没做。
<div class="col-xs-12 move-down">
<div style="padding-top:7px; display:inline-block;">This is a new email address. Would you like to:</div>
<div style="display:inline-block;">
<label class="checkbox-inline" data-toggle="collapse" href="#collapsesignup">
<input type="checkbox" id="" value="option1"> Create account
</label> <label class="checkbox-inline">
<input type="checkbox" id="" value="option1"> Guest checkout
</label>
</div>
</div>
答案 0 :(得分:0)
将代码复制到jsfiddle
时看起来很好但是,在这种情况下,position: relative
会有所帮助
https://jsfiddle.net/jacobgoh101/wne16hm1/
.checkbox-wrapper {
position: relative;
top: -1px;
}