I'm facing a challenge with wrapping multiple items in a container. I want the second label to fit as much as possible on the first line, with the remaining text continuing on the next line. What could be the solution here?
Desired Outcome:
https://i.sstatic.net/LRTbK.png
.container {
width: 100%;
display: flex;
flex-wrap: wrap;
gap: 4px;
}
<div class='container'>
<div class='content'>Label1 |</div>
<div class='content'>Loooooooong long label</div>
</div>
Please note that the parent must have display: flex
for this to work correctly. Thank you.