G
G
Gera112019-11-25 15:10:59
Bootstrap
Gera11, 2019-11-25 15:10:59

How to reorder columns in bootstrap4 in mobile version?

<div class="row">
        <div class="col-md-3">
         sidebar1
        </div>
        <div class="col-md-6 mb-4 pr-md-0 pl-md-0 ">
          {content}
        </div>
        <div class="col-md-3">
        siderbar2
        </div>
      </div>

The question is very simple, but for the life of me I can not understand what the catch is.
The trick is that the grid already exists (above) and cannot be changed. It is necessary that in the mobile version the central block with {content} be at the very top and in turn below the sidebar.
Tried through all sorts of offsets but I can't figure out how they work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2019-11-25
@KickeRockK

<div class="row">
        <div class="col-md-3 order-1 order-md-0">
         sidebar1
        </div>
        <div class="col-md-6 mb-4 pr-md-0 pl-md-0 order-0 order-md-1">
          {content}
        </div>
        <div class="col-md-3 order-2">
        siderbar2
        </div>
      </div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question