A
A
Anton2019-11-29 19:04:43
css
Anton, 2019-11-29 19:04:43

2 adaptive blocks, stretch one after another in height, but there is a problem with the content, how to solve it?

Hello everyone, I was thinking how to formulate the question correctly))
There are two blocks, for beauty I made one to stretch after the other in height.
For the content inside can be of different lengths, well, it’s not nice that one block is longer than the other.
At first, I did this:
5de140668f911036698581.png
But it's not so beautiful, and I decided to press the button in the left block to the bottom.
And it turned out like this.
5de1409d893af432189999.png
There was a problem, if you make the content smaller in the right block, then the button on the left becomes higher and runs over the content, how to fix it, margin or padding does not work.
Here is a working example: https://jsfiddle.net/7q8o35c0/3/
What happens if there is less content in the left block, then on the left you can see that the button runs over the text.
5de1417665912341032956.png
How can the problem be solved? tell.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rustam Bainazarov, 2019-11-29
Websaytovsky @ws17

Learn flex.
For example, like this:
Or like this:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question