Miloš Leng
Miloš Leng

Reputation: 111

How do you push and pull columns on BOOTSTRAP 5?

I have tried these 2 options:

<div class="col-md-4 col-md-push-8 bg-danger">

and

<div class="col-md-4 order-md-8 bg-danger">

Neither is working.

Upvotes: 3

Views: 2094

Answers (1)

Yudiz Solutions
Yudiz Solutions

Reputation: 4459

Can you please check the below code and link? Hope it will work for you. In Bootstrap 5, .offset-*-* classes use for the set the offset.

Please refer to this link: https://jsfiddle.net/yudizsolutions/s9qn4o71/4/

<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">

<!-- Extra Example  -->
<div class="container">
<div class="row">
  <div class="col-md-4 offset-md-8 bg-danger">col-md-4 offset-md-8</div>
</div>
  <div class="row">
    <div class="col-md-3 offset-md-3 bg-danger">.col-md-3 .offset-md-3</div>
    <div class="col-md-3 offset-md-3 bg-danger">.col-md-3 .offset-md-3</div>
  </div>
  <div class="row">
    <div class="col-md-6 offset-md-3 bg-danger">.col-md-6 .offset-md-3</div>
  </div>
</div>

Upvotes: 1

Related Questions