F
F
freeman02042016-07-10 16:23:03
css
freeman0204, 2016-07-10 16:23:03

Why does the picture flatten in this case?

Code If there is not enough text in the block, then everything is ok, but if there is a lot of text, then the pictures are flattened horizontally in different ways, one is a little less, one is a little more. Why is this happening? The image has a specific width and height, shouldn't it be the same?
Maybe it's all to blame?

display: flex;
  justify-content: space-between;

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey delphinpro, 2016-07-10
@freeman0204

Specify that the image cannot be compressed - flex-shrink: 0;
In the context of flexbox, any element behaves like a flex box. The width of such a block is calculated based on the content and parameters flex-grow, flex-shrink, flex-basis.
You can also use max-width, min-width for restrictions, but I think this is a crutch in this context.

A
A person from Kazakhstan, 2016-07-10
@LenovoId

I looked at your example there and added and subtracted text image what it was and remains

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question