Sizing container to overflowing text

Hi all - I am having trouble with text overflowing and messing up my layout. Whenever I narrow a section and the line breaks push other elements down they overflow from the container. How can I make a container size adapt to the overflowing text or should I take a different design approach?

Thanks!