Bootstrap 4 align elements right inside a col div

前端 未结 3 1630
暖寄归人
暖寄归人 2020-12-16 15:35

My question is pretty simple but I don\'t find a proper way (I mean not use absolute positionning of sub elements inside a relative position container) to achieve this in Bo

3条回答
  •  再見小時候
    2020-12-16 16:18

    Use ml-auto to push the buttons to the right...

    https://codepen.io/anon/pen/evbLQN

    
    

    Another option is to remove the btn-group from the col-md-4, and then float-right will work as expected. The pull-right class was replaced by float-right in Bootstrap 4.

    Applications portfolio


    PS - To prevent the horizontal scrollbar visible in your Codepen, make sure the .row is placed inside a container-fluid. Also, generally col-* are used to contain content, and shouldn't be applied to other components/elements. So, for example if you wanted to use the btn-group..

    Applications portfolio

    http://www.codeply.com/go/8OYDK5D8Db


    Related: Right align element in div class with bootstrap 4

提交回复
热议问题