Answer the question
In order to leave comments, you need to log in
How can I make the block heights the same?
There are 4 blocks in which there is content with different sizes. So here's how to set the height of the blocks so that they do not adjust the height to the amount of content, but have a certain height, regardless of the amount of content.
Answer the question
In order to leave comments, you need to log in
в старину это делали через table-cell, сейчас можно через flexbox:
<div class="list">
<div class="item">...</div>
<div class="item">...</div>
<div class="item">...</div>
</div>
.list
{
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.item
{
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
ну можно заюзать скрипт для выравнивания высоты по максимальному https://jsfiddle.net/cm8ctzL0/9/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question