H
H
Heorhii2018-05-16 00:01:06
css
Heorhii, 2018-05-16 00:01:06

How to adaptively align content in blocks of the same height?

Hello. There are two blocks of the same height, but I can't figure out how to make a "space" equal to the height of the content of the first block just after the p tag, that is, in fact, I just need to nail the button at the bottom, taking into account the indents inside the block, but adaptability is a problem. Help solve
5afb4ab7d02f0871132359.jpeg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
boga-net, 2018-05-16
@deasmont

https://jsfiddle.net/7sxftanL/9/

O
Odisseya, 2018-05-16
@Odisseya

The button must be a flex item, margin-top: auto;so set it to the button will be pushed from above to the available height. The blocks will be the same height, provided that the alignment (along the transverse axis) of the flex container is stretch.

D
Dymok, 2018-05-16
@UnluckySerivelha

container

display: flex;
flex-direction: column;

button: example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question