I would like to break long words inside "div2", both div2 and div3 width cannot be greater than parent width (i.e 150px). The only thing that works is word-break: break-all
but this will break short words as well.
#div1{
display: flex;
max-width: 150px;
height: 100px;;
}
#div2{
background-color: gray;
}
#div3{
background-color: rgb(197, 181, 181);
}
#div4{
width: 150px;
background-color: rgb(144, 199, 172);
}
<div id="div1">
<div id="div2">aaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb</div>
<div id="div3">oooo</div>
</div>
<div id="div4">150 px - max width</div>