0

How to put offset in bootstrap4 beta. col-offset-"offset value" is not working for me. How can I solve this? Thank you

Self
  • 497
  • 1
  • 6
  • 19

2 Answers2

0

col-{selector}-offset-{value} has been replaced with ml-auto or mr-auto class, depending on which side you want for margin to start.

You should read the documentation next time when trying out new versions of frameworks.

Vladimir Jovanović
  • 5,143
  • 5
  • 21
  • 42
-1

We dont do offset instead we give a margin , bootstrap 4 uses flex so its a little bit different from previous versions alpha-4 included. we use .mt-auto to give remaining coloums for margin or else we can do different margin for different screen sizes

<div class="row">
  <div class="col-md-4">.col-md-4</div>
  <div class="col-md-4 ml-auto">.col-md-4 .ml-auto</div>
</div>

It's there in the bootstrap 4 beta documentation https://getbootstrap.com/docs/4.0/layout/grid/#offsetting-columns

Mayank Singh Fartiyal
  • 867
  • 1
  • 11
  • 26