내용의 길이에 따라 너비와 높이를 변경할 수있는 상자를 만들고 싶습니다. 따라서 한 줄의 선이 있다면 더 작은 높이를 가져야합니다. 줄이 10 개인 경우 높이가 커야합니다. 상자를 중앙에 놓고 싶습니다. 미리 감사드립니다. 나는 상자를 만들 싶습니다CSS의 내용에 따라 블록의 크기를 어떻게 바꿀 수 있습니까?
<div style=" border: 1px solid black; margin-left: auto; margin-right: auto; max-height: 25em; max-width: 20em; min-height: 10em; min-width: 12em; position: relative; white-space: nowrap">
<img src="https://4.bp.blogspot.com/-4wmRO867-W4/V7qwJGfVBYI/AAAAAAAAAL0/XQHdOxK34asRSXt3FfBKnOS_wGRcneFEwCEw/s1600/quote_basic.png" style="border: none; clear: left; float: left; position: relative;" />
<span style="font-style: italic; left: 50%; margin-right: -50%; margin: 0; position: absolute; text-align: center; top: 50%; transform: translate(-50% , -50%); display: inline-block;"> "This is the one-line content" </span>
<img src="https://4.bp.blogspot.com/-kg4kc90TSqs/V7rjthACJLI/AAAAAAAAAMM/sV7buqkUWH8KqYfBVlCGnq14qMdo4eetwCLcB/s1600/quote_basic_mirrored.png" style="border: none; clear: right; float: right;position: relative; top: 8em" />
</div>