0

Как сохранить высоту flex элемента при переносе на следующую строку. Пример: https://jsfiddle.net/durgtym6/6/

.post-desc__other-offer-wrap {
    margin: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    color: #525252;
}
.post-desc__other-offer-item {
    width: 20%;
    padding: 15px 25px;
    background-color: #e0e0e0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    text-align: center;
    margin-bottom: 25px;
}
<div class="post-desc__other-offer-wrap">
  <p class="post-desc__other-offer-item">Смартфон в режиме точки доступа
  </p>
  <p class="post-desc__other-offer-item">USB-модем
  </p>
  <p class="post-desc__other-offer-item">Мобильное устройство
  </p>
  <p class="post-desc__other-offer-item">Однооператорный роутер
  </p>
</div>

1 ответ 1

0

С помощью flexbox сделать это невозможно. Похожего эффекта можно добиться с помощью display: grid.

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.