情况如何:
当前第二个组件被向右推,但是其内容向左对齐。我试图添加float-right
类,但是没有用。
<div class="container">
<form class="form-row">
<div class="col-md-3">
Some component here
</div>
<!--Content of this element should be aligned to right-->
<div class="col-auto ml-auto">
<div class="form-inline">
<label>Some label</label>
<input class="form-control" readonly>
</div>
<div class="form-inline">
<label>Other longer label</label>
<input class="form-control" readonly>
</div>
</div>
</form>
</div>
答案 0 :(得分:0)
我已将 <div class="container full-width--true">
// My full-width container
</div>
添加到后面的元素style="display: flex; justify-content: flex-end"
中,并且按我的意愿工作了。