Answer the question
In order to leave comments, you need to log in
The block with the picture shrinks to arbitrary sizes, why?
Hello.
https://github.com/SvetlanaSharkunova/vanilla-js-m...
blocks (flex elements) are added to the flex container using JS, each flex element contains 2 main blocks: .menu-imgblock (block with image) and .menu-item-body (block with content)
.menu-imgblock blocks are given width and height, but even without images, the blocks have different sizes.
It is not clear what this could be related to.
When inserting pictures, I used answers from the topic:
How to fill a block with a picture without a background?
Pictures initially have different sizes and the option is not considered when the pictures are processed and reduced to the same size.
When inserting images into a block, the following occurs: the sizes of the blocks containing the image do not match the specified
Question: how to make pictures of different sizes fill a block of given sizes and at the same time maintain normal proportions
, it should look like this:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question