H
H
html-css2020-02-17 20:55:43
Flexbox
html-css, 2020-02-17 20:55:43

Flex - not working on mobile?

On mobile, everything is exactly the same blocks are lined up in 1 column
, what could be the problem?

.flex-container {
    display: flex;
    flex-wrap: wrap;
}

flex-item {
    width: calc((100% / 2) - (20px / 2));
    margin-right: 10px;
    margin-bottom: 10px;
}
.flex-item:nth-child(2n) {
    margin-right: 0;
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question