I
I
Ivanushka2552020-10-03 18:06:07
css
Ivanushka255, 2020-10-03 18:06:07

How to push a child element to the edge of the parent?



I need to push the very last block with icons to the bottom of the parent element. The parent element I'm setting display: flex;is <div class="wrapper_two-blocks">(it includes <div class="content_block">and <div class="footer_block">). In order to pinch the bottom block with icons (I have it <div class="footer_block">), I ask <div class="content_block"> flex: 1 0 auto;

Can I fail to pin the box due to the fact that it is itself <div class="footer_block">the parent of flex items (in its CSS display:flex;).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ankhena, 2020-10-03
@Ivanushka255

second_block has a minimum height of 360px.
The content of its child blocks is not enough to fill those 360px.
=> wrapper_two-blocks doesn't reach the bottom of the parent.

In order to press the bottom block with icons (I have it <div class="footer_block">), I set<div class="content_block"> flex: 1 0 auto;

You are asking the wrong block.
Frame the blocks to understand who is the parent of whom and what size.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question