Answer the question
In order to leave comments, you need to log in
How to make permanent 3 columns in flexbox, regardless of the width of the elements?
Good afternoon, please tell me how to make always three columns in the parent having the property display: flex; regardless of the width of the elements.
Now like this:
<div class="wrapper">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
wrapper {
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
height: 500px;
}
.item {
width: 30%;
height: auto;
}
Answer the question
In order to leave comments, you need to log in
.wrapper {
/* Добавьте строку ниже */
justify-content: space-between;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question