I am facing a challenge with two text blocks of varying lengths. The left block contains short text while the right block may have lengthy content. Both blocks need to be displayed side by side, occupying 100% of the parent's width exactly.
For a simplified example, you can refer to this code snippet: https://jsfiddle.net/hh6a03cy/1/
<div style="white-space: nowrap; font-size: xx-large;">
<span>woohoo</span>
<div style="display: inline-block; overflow-wrap: break-word; width: 100%; white-space: normal; vertical-align: top;">gggggggggggggggggggg...
</div>
</div>
The issue with this setup is that the right block extends beyond the parent's width, causing a horizontal scroll bar. Ideally, the combined width of both blocks should total 100%, not more or less than that.
Any suggestions on how to achieve this?
Thank you!