Thank you for writing in, I see that you're manually hard-coding the
<div style="display:inline-flex"> on the text element, please add a
flex-wrap: wrap; rule to that so its content will be wrapped.
Do the same thing for your inline-menu, you can enable its wrap children option.
You can learn more about flexbox on the following resources.
Guide to Flexbox