How to prevent the elements of width and height from being compressed?

is there any way to prevent the child element from being compressed when the parent element reduces the width when the child element is not set to fix width and height (stretched by padding)?

setting height and width:
I am a child element

No high width compression occurs (newline occurs):
I am a child
element

Mar.30,2021

there is no way, the phenomenon you are talking about is the result that should be. The width of the child element is not set, the parent element narrows, and the text in the child element must wrap.


is also possible, by setting a minimum boundary for the parent element

Menu