A
A
andrkkk2020-11-13 16:48:59
css
andrkkk, 2020-11-13 16:48:59

How to position the last card on the left when moving to a new line without extra indent?

There are cards, when the screen is reduced, they go to a new line, but they stand in the middle, tk. parent do like this:
align-items: center;

&:last-child{
      justify-content: flex-start;
    }

Everything is fine, but in general, the container on the right has extra space.
How to deal with it?
Here is a sandbox with my styles https://jsfiddle.net/q9pk5ner/1/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2020-11-13
@andrkkk

<div class="main">
  <div style="display: inline-block; margin: auto;">
    <div class="wrapper">
      <div>
        1
      </div>
      <div>
        2
      </div>
      <div>
        3
      </div>
      <div>
        4
      </div>
      <div>
        5
      </div>
      <div>
        6
      </div>
    </div>
  </div>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question