Answer the question
In order to leave comments, you need to log in
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
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
something like this, can be improved, but I'm too lazy https://jsfiddle.net/38Tnx/5499/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question