S
S
statxems2021-06-25 21:51:30
css
statxems, 2021-06-25 21:51:30

How to not justify a grid element?

Here's what happened to me

60d6248b5f511043061641.png

And here's how to
60d6250933aea748980203.png

For Parent Block used this code
display: grid;
grid-template-columns: auto auto;
grid-column-gap: 12px;
grid-row-gap: 12px;

All inner elements with the same padding padding: 15px 8px;

What is the correct way to make it so that the width was inline in width.
And in general it is possible to do this without nth: child, as in the example.
It seems to me that the designer overdid

it. Flex is possible, but he is interested in grids)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kryamk, 2021-06-25
@kryamk

flex flex-wrap: wrap is needed here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question