How do I control the wrapping of child elements in a grid in Webflow?

TL;DR
  • Use Grid's Auto-Flow settings (Row or Column) and adjust column or row counts per breakpoint to control item wrap.  
  • For dynamic, responsive wrapping, consider using Flexbox with Wrap enabled instead of Grid.

To control the wrapping of child elements in a grid in Webflow, you'll need to set specific grid configurations rather than relying on automatic wrapping like Flexbox.

1. Understand Webflow Grid Structure

  • Webflow Grids are based on explicit rows and columns.
  • Grid items do not automatically wrap like in Flexbox; each item is assigned a specific grid cell unless placed in Auto layout areas.

2. Use Auto-Flow to Control Item Placement

  • By default, Webflow places grid children in "Auto" grid cells, filling row by row or column by column based on the layout direction.
  • Go to the Grid element, and under Layout, you’ll see Auto-Flow options: Row and Column.
  • Auto-Flow: Row means items fill left to right, wrapping to the next row.
  • Auto-Flow: Column means items fill top to bottom, wrapping to the next column.

3. Adjust Grid Columns or Rows for Wrapping

  • To control wrapping, reduce or increase the number of columns or rows in the grid.
  • For responsive behavior, create media queries (Breakpoints) and change column count to control how many items appear per row.
  • Example: On desktop, 4 columns; on tablet, 2 columns; on mobile, 1 column.

4. Use “MinMax” with Auto-Fill for Dynamic Grids

  • For flexible wrapping, switch the Grid to Custom Code > CSS Grid and use minmax() and auto-fill via embedded CSS, but this is not natively controlled via Webflow’s UI.
  • In native Webflow, simulate this by using Flexbox instead, which wraps more naturally.

5. Consider Flexbox as an Alternative

  • If you need natural wrapping of items based on container width, consider using Flexbox with Wrap enabled.
  • Flexbox allows easier control over wrap behavior on different screen sizes.

Summary

Webflow Grid does not support automatic wrapping of children like Flexbox. To control how items wrap:

  • Use Auto-Flow: Row or Column
  • Adjust Column/Row count per breakpoint
  • Consider Flexbox for dynamic wrapping scenarios

Use Grid when you need precise placement; use Flexbox when you need flexible wrapping.

Rate this answer

Other Webflow Questions