Why is the text not wrapping within the div in Webflow, causing it to expand vertically in mobile view?

TL;DR
  • Enable "Wrap Children" in the Overflow settings under the Style panel for the text element.
  • Set White Space property to "Normal" to allow text breaking.
  • Adjust flex direction to "Column" for Flexbox or configure Grid to auto-fit content.
  • Check padding and margins to avoid unnecessary expansion.
  • Adjust font size and line height in Typography settings for mobile views to enhance readability.

Text not wrapping within a div in Webflow can often lead to layout issues, especially on mobile view, as the div expands vertically to accommodate the content.

1. Check Text Overflow Settings

  • Select the text element within the div in the Webflow designer.
  • Within the Style panel, check the "Overflow" settings.
  • Ensure that "Wrap Children" is enabled to allow text wrapping.

2. Examine White Space Settings

  • Still under the Style panel, locate the White Space property.
  • Make sure it is set to "Normal". This enables text to break and wrap within the div.

3. Adjust Flexbox or Grid Layouts

  • If using Flexbox, check that the flex direction is set to “Column” if you want items to stack vertically, which helps in proper text wrapping.
  • In Grid layouts, verify that the grid is configured to auto-fit content, which prevents unnecessary vertical expansion.

4. Inspect Padding and Margins

  • Ensure that unnecessary padding and margins are not causing the div to expand more than needed.
  • Decrease padding/margin on mobile breakpoints if required.

5. Responsive Typography

  • Use the Typography settings to change font size on mobile views to ensure readability without excessive expansion.
  • Adjust the line height and font size according to smaller screen sizes.

Summary

Ensure the Overflow and White Space properties are set correctly to permit text wrapping. Adjust flex directiongrid settingspadding, and typography for mobile responsiveness to prevent the div from expanding vertically.

Rate this answer

Other Webflow Questions