M
M
MRcracker2020-09-09 13:00:30
Layout
MRcracker, 2020-09-09 13:00:30

How to move a flex element to a new line?

There is a block that contains several div blocks with the col class. How can I force some of them to wrap to a new line?

<div class="container">
  <div class="row">
    <div class="col">1</div>
    <div class="col">2</div>
    <div class="col">3</div>
               <div class="col">5</div>
  </div>
</div>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
MRcracker, 2020-09-09
@MRcracker

to force a side to be moved to a new line, then it must be placed in a new block with the class row

C
CatCotCod, 2020-09-09
@CatCotCod

Play with the .col class (.col-2, col-3 and so on)
Everything is explained on this topic in detail - https://bootstrap-4.ru/docs/4.0/layout/grid/

<div class="container">
  <div class="row">
    <div class="col-6">1</div>
    <div class="col-6">2</div>
    <div class="col-2">3</div>
               <div class="col-4">5</div>
  </div>
</div>

G
German Zuiakov, 2020-09-11
@HermanZuiakov

So on a new line, transfer the desired block and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question