Janath
Janath

Reputation: 1248

Bootstrap column order on mobile?

I have two sections. When mobile, the second div goes under first div. But how can I get the second div first when mobile (col-sm or col-xs)?

<div class="col-md-8">
Hello
</div>

<div class="col-md-4">
world
</div>

Upvotes: 0

Views: 1559

Answers (2)

Pravin Vavadiya
Pravin Vavadiya

Reputation: 3207

You can Use boostrap class col-lg-push-x and col-lg-pull-x.

Also see Demo Here: enter link description here

Exp:

<div class='row'>
<div class='col-lg-5 col-lg-push-5'>World</div>
<div class='col-lg-5 col-lg-pull-5'>Hello</div>
<div class='col-lg-2'></div>
</div>

Upvotes: 3

Anna Jeanine
Anna Jeanine

Reputation: 4125

Try changing your code to:

<div class="col-lg-9 col-lg-push-3">
Hello
</div>

<div class="col-lg-3 col-lg-pull-9">
World!
</div>

Upvotes: 0

Related Questions