S
S
Super Star2016-09-06 16:36:14
css
Super Star, 2016-09-06 16:36:14

Will they diverge according to the height of the product card?

Hello. It is not possible to make the product cards the same size: https://jsfiddle.net/2b1Ldsyp/
As I understand it, this is due to the fact that the amount of text inside is different. How to make the cards have the same height and the gaps between them are the same.

Answer the question

In order to leave comments, you need to log in

7 answer(s)
S
Super Star, 2016-09-06
@3dben

Found a solution with display: inline-block.
It was necessary to do this:
.wrapper li{
display: inline-block;
vertical-align: middle;
margin: 10px 5px;
}
After I added vertical-align: middle; I have blocks in which more text began to behave as they should and everything aligned. I think adding EqualHeight.js-master would be even better, but that's not my goal. Here is the end result https://jsfiddle.net/zuhkLtfd/ Thanks everyone =)

D
DTX, 2016-09-06
@DirecTwiX

display:flex;
align-items: stretch;
frontender.info/a-guide-to-flexbox/#codealignitemscode
https://jsfiddle.net/2b1Ldsyp/3/

M
mletov, 2016-09-06
@mletov

"Spread out" - this is 5!
And the essence of the question: to simulate a table through display: table and display: table-cell
But if adaptive, then, of course, not an option

A
A person from Kazakhstan, 2016-09-06
@LenovoId

codepen.io/Geyan/pen/zKxZwQ?editors=1100 right?

A
Alexey Bulba, 2016-09-06
@Xserber

After reading the replies and comments.
It can be solved with the EqualHeight.js-master plugin if jquery is already connected to the site.
It automatically increases the height of the block so that they are the same.

E
entermix, 2016-09-07
@entermix

Use jquery.matchHeight.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question