A
A
Alexander Osadchy2020-10-14 18:43:25
css
Alexander Osadchy, 2020-10-14 18:43:25

Grid-column-gap and grid-row-gap - how to do it on flex-box?

Hello!

There's a simple grid on a grid - two columns, with 15px vertical padding, and 20px horizontal - how to do the same on flex-box ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
RAX7, 2020-10-14
@DELUX

P
profesor08, 2020-10-14
@profesor08

gap for flexbox is not well supported yet. Therefore, if you want on flex, then suffer with indents (margin-top, margin-left, margin-right). But why, if you can use grids?

L
LJ322, 2020-10-14
@LJ322

.element {
 display: flex;
 row-gap: 20px;
 column-gap: 15px;
}

But this is not supported in all browsers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question