How to get the green div
have the same variable height as the red div
?
Meaning when the text in green grows, that then also the height of the red box grows to be the same as the green box.
I know I can remove the span
from .aaa
, but for other code impact this is not feasible solution. .aaa span
has to remain.
.aaa span {
display: flex;
padding: 20px;
font-size: 1.6em;
}
.bbb {
width: 50%;
float: left;
text-align: left;
color: black;
background: red;
}
.ccc {
width: 30%;
text-align: center;
background-color: green;
}
<div class="wrapper">
<div class="aaa"><span class="bbb">Hello hello hello hello hello Hello hello hello hello hellotitle titletitle titletitle titletitle titletitle titletitle title</span>
<span class="ccc">12345</span>
</div>
</div>
f f f