我有这样的标记:
<div class="wrapper">
<div class="row">
<div class="col-md-4"></div>
</div>
<div class="next-to-div"></div>
</div>
我想将div.next-to-div
放在div.col-md-4
旁边。如果使用此标记,则显然它将div放到新行。请帮忙!
答案 0 :(得分:1)
将div.next-to-div放入div.row
<div class="wrapper">
<div class="row">
<div class="col-md-4"></div>
<div class="next-to-div"></div>
</div>
</div>
答案 1 :(得分:0)
您可以制作容器d-flex
并使用justify-content-between
来分隔div ...
<div class="wrapper container-fluid d-flex justify-content-between">
<div class="row flex-grow-1">
<div class="col-md-4">col 4</div>
</div>
<div class="next-to-div">next dov</div>
</div>