-2

I am using BootStrap 3 Framework for my portfolio

I am trying to make 2 columns in a section with classes of col-md-6. The problem is I want the right hand side column to stack first and not the left hand side when the website goes responsive. So how do I do it?

Sarbbottam
  • 5,410
  • 4
  • 30
  • 41

2 Answers2

1

Collected from another Answer

Documentation: grid-column-ordering

col-md-push-6 will "push" the column to the right 6 and col-md-pull-6 will "pull" the column to the left on "md" or greater view-ports. On any smaller view-ports the columns will be in normal order again.

I think what throws people off, is that you have to put B above A in your HTML. There may be a different way to do this where A can go above B in the HTML, but I'm not sure how to do it...

<div class="row">
  <div class="col-md-6 col-md-push-6">B</div>
  <div class="col-md-6 col-md-pull-6">A</div>
</div>

view-port >= md

|A|B|

view-port < md

|B|
|A|

Ref: bootstrap-right-column-on-top-on-mobile-view

Community
  • 1
  • 1
Murad Hasan
  • 9,565
  • 2
  • 21
  • 42
0

Hint: Use col-xs-6 too for extra small devices.

user31782
  • 7,087
  • 14
  • 68
  • 143