D
D
deemaagog2018-03-22 11:01:45
css
deemaagog, 2018-03-22 11:01:45

How can such a block be created?

Plz tell me how can i do this?
div1 should always be a square, regardless of the width and height of the parent block. And div2 should stretch, i.e. occupy all free space
5ab362532b18b576088332.png
height can be dynamic and is determined by the height of the parent block. Therefore, it is impossible to rigidly set the width and height of the square.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
ink, 2018-03-22
@AskMy

htmlbook.ru/layout

V
Vladislav Lyskov, 2018-03-22
@Vlatqa

something like this, can be improved, but I'm too lazy https://jsfiddle.net/38Tnx/5499/

A
Alex, 2018-03-22
@astrodeep

flexbox)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question