Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 4 right Column on top on mobile view

I have a Bootstrap 4 Page like this:

<div class="row">
    <div class="col-md-8">
        A
    </div>
    <div class="col-md-4">
       B
    </div>
</div>

Looks like:

-----
|A|B|
-----

So if I look at it on a mobile Device, the Column A is on top, but I want the B on top. Is this possible? I tried it with push an pull, but it didn't work Because I'm using Bootstrap 4.

like image 910
Abbaszadeh Avatar asked Oct 24 '17 21:10

Abbaszadeh


People also ask

How do I change the position of a column in Bootstrap?

We can easily change the order of built-in grid columns with push and pull column classes. The Push and Pull Classes: The push class will move columns to the right while the pull class will move columns to the left.

What is Col lg 2?

col-lg-2: This class is used when the device size is large or greater than 992px and the maximum width of container is 960px and when you want size equal to 2 columns.


1 Answers

With Bootstrap 4 you can use the following classes.

order-first, order-last and order-0 - order-12

on your element.

Have a look here: Column ordering in Bootstrap 4

like image 104
Tian Reagon Avatar answered Sep 30 '22 00:09

Tian Reagon