In Phase 2 of our Mastering Flexbox collection, we showed you simple the right way to create equal-height enjoying playing cards with aligned buttons using Align Items > Stretch, Justify Content material subject matter > Space Between, and Expand To Fill. In this third installment, we’ll focus on one of the essential building choices in Divi 5: Construction Wrapping.
Construction Wrapping controls whether or not or no longer flex items stay on one line or switch onto additional traces when there isn’t sufficient room. Choosing between No Wrap, Wrap, and Wrap Reverse affects what choice of rows you want, how your construction responds all over breakpoints, and how much information building you want to prepare.
In this post, we’ll evaluation No Wrap and Wrap building templates, provide an explanation for when each selection is sensible, and show how supporting controls like Column Class, Align Content material subject matter, and Display Order let you assemble cleaner responsive layouts without custom designed CSS.
Let’s dive in.
Understanding Construction Wrapping In Divi 5
In Divi 5, Construction Wrapping controls whether or not or no longer direct child portions within a Flex container stay on a single line or wrap onto additional traces when they run out of house.
This is essential on account of wrapping best affects the direct children of the container you’re bettering. For example, should you’re bettering a Row, wrapping affects its Columns. Will have to you’re bettering a Module Group, wrapping affects the modules or groups within it.
The three Construction Wrapping Possible choices
Divi 5 gives you 3 Construction Wrapping conceivable possible choices:
No Wrap
No Wrap keeps all direct child items on a single flex line. If there isn’t sufficient room, items would in all probability shrink, overflow, or create horizontal scrolling depending on their sizing and other construction settings.

Wrap
Wrap we could in items to move onto additional traces when they no longer have compatibility inside the dad or mum container. That’s the foundation for a lot of responsive card grids, galleries, feature sections, footer layouts, and multi-column content material subject matter blocks in Divi 5.

Wrap Reverse
Wrap Reverse moreover we could in items to wrap, however it undoubtedly reverses the course by which new flex traces are situated along the go axis. It does not reverse the order of each particular person products. As a substitute, it changes where wrapped traces appear.
This can be useful when you want wrapped traces to stack within the flawed manner at a specific breakpoint. For precise item-by-item reordering, use Display Order.

When To Use Each Chance
Use No Wrap when you intentionally want portions to stay on one line. This works smartly for compact navigation patterns, button groups, logo rows, or any construction where automatic line breaks would disrupt the design.
Use Wrap when you want a construction to conform all over available house. This is one of the useful selection for feature enjoying playing cards, pricing tables, team of workers grids, galleries, blog post layouts, footer groups, and other multi-line structures.
Use Wrap Reverse when you want wrapped traces to stack within the flawed manner. It’ll smartly help with explicit responsive patterns, on the other hand for detailed cellular ordering, combine it with the Display Order field at the Column or module level.
How Wrapping Interacts With Construction Trail
Construction Wrapping changes in line with the container’s Construction Trail.
With Row course, items waft horizontally. When Wrap is enabled, overflowing items switch onto a brand spanking new line beneath. With Wrap Reverse, the new wrapped line is situated inside the opposite cross-axis course.
With Column course, items waft vertically. When Wrap is enabled, overflowing items can switch into a brand spanking new column along the go axis.
For Column wrapping to be visible, the mummy or dad container generally needs a defined peak. If the container peak is ready to Auto, there could also be no constrained vertical house that forces items to wrap into each different column.

Align Content material subject matter becomes useful when wrapping creates a few flex traces and the mummy or dad container has further cross-axis house to distribute.

On account of Divi 5’s Flexbox controls are responsive, you’ll keep watch over Construction Wrapping, Construction Trail, gaps, and alignment settings one at a time at different breakpoints.
No Wrap Development Templates
When Construction Wrapping remains set to No Wrap, all direct children stay on a single flex line. This is familiar behavior for a lot of Divi consumers and works smartly for simple row structures. Then again, when you want a few traces, No Wrap generally method growing and managing a few rows.
Example: Feature Taking part in playing cards With No Wrap
To create a two-row grid of six feature enjoying playing cards with No Wrap, you want two separate rows, each with 3 columns.

Inside the example beneath, the footer construction requires a few rows to create separate desktop traces: one row for five columns, one row for a full-width area, and each different row for two columns.

The limitation of No Wrap is structural. It can be predictable, on the other hand the remaining previous a single line ceaselessly calls for extra rows, further duplicated building, and further breakpoint keep watch over.
Wrap Development Templates
While you permit Construction Wrapping > Wrap, the an identical layouts turn out to be further flexible. As a substitute of manually growing separate rows, you’ll ceaselessly use one dad or mum row and allow its child columns to wrap naturally.
For example, the an identical six-card construction can be built with one row and six columns.

With Wrap enabled, the enjoying playing cards waft into a few traces. To create the three-column desktop building, set each column’s Column Class to 1/3 inside the Design tab beneath the Sizing selection personnel.

Inside the Wrap fashion of the footer construction, a single row can come with a few columns with different Column Class settings. The main 5 columns are set to 1/5 width, placing the primary link groups side via side on desktop. The sixth column is ready to Fullwidth, and the remaining columns are set to 1/2 width.

This lets one flexible row handle a further difficult desktop building while nevertheless adapting further cleanly at smaller breakpoints.
Mastering Align Content material subject matter For Multi-Line Layouts
While you permit Wrap or Wrap Reverse and your content material subject matter flows onto a few traces, Align Content material subject matter controls how those wrapped traces are distributed along the go axis. This is different from Align Items, which aligns particular person items within each line.
Important follow: Align Content material subject matter best has a visible have an effect on when there are a few flex traces and the mummy or dad container has further cross-axis house. If the row peak is ready to Auto and the container best grows to fit its content material subject matter, Align Content material subject matter would in all probability appear to don’t the rest.

Align Content material subject matter vs Align Items
Align Items aligns particular person flex items within each flex line along the go axis. It affects the items themselves, not the crowd of wrapped traces.
Align Content material subject matter aligns the wrapped traces as a group all over the mummy or dad container’s available cross-axis house.
The simplest method to bear in mind it:
- Align Items: Aligns items within each flex line.
- Align Content material subject matter: Aligns the flex traces themselves when wrapping creates a few traces.
Wrap Reverse And Display Order
While Wrap is the selection you’ll use most ceaselessly, Wrap Reverse gives you otherwise to change how wrapped traces stack. It can be helpful for explicit responsive patterns, however it undoubtedly will have to not be treated as an alternative choice to Display Order when you want precise item-level control.
Example: Featured Pricing Card
When growing multi-column pricing tables, a Featured card can in the end finally end up on the second wrapped line on smaller displays, causing it to look less than the surrounding plans.

By the use of enabling Wrap Reverse at Tablet and Phone breakpoints, you’ll trade where the wrapped line turns out and bring that Featured card higher inside the visual waft.
In more difficult layouts with a few columns, Display Order becomes the better device. This situation uses a three-row alternating image-and-text construction. On desktop, the development works smartly. On cellular, the natural provide order can stack images together, growing an awkward waft.
How Display Order Works
You don’t wish to set a worth on each column. Adjust best the columns that wish to switch out of their natural provide order. Columns left blank keep their default order value and handle their relative position among other unchanged items.

In this construction, best 3 columns wish to trade on the Phone breakpoint. Select the third column, go to the Content material subject matter tab, build up the Order selection personnel, and set Display Order to 2.

Next, set the fifth column to 3 and the sixth column to 4.
The end result’s a cleaner alternating pattern of images and text on cellular, with only a few focused order changes.
Skilled Tip: Use Wrap Reverse for line-level stacking changes and Display Order for item-level reordering. Combining each and every at explicit breakpoints means that you can keep the desktop building clean while improving the cellular waft.
Responsive Absolute best Practices & Skilled Tips
Divi 5 gives you responsive control over wrapping behavior. Listed below are a few practices that let you get better results.
Use Divi 5’s Responsive Tools
All the time preview layouts at Desktop, Tablet, and Phone breakpoints. Use the Responsive Editor and Customizable Responsive Breakpoints to keep watch over Construction Wrapping consistent with device when sought after.
For example, you’ll keep No Wrap on Desktop for a horizontal logo bar, then switch to Wrap on Tablet and Phone so the trademarks can switch onto additional traces.
Combine Settings For Efficiency
Pair Wrap with Column Class settings to create responsive layouts using fewer rows. Combine Wrap and Align Content material subject matter when you want upper distribution all over a few traces, and use Display Order best on the columns that wish to trade position at smaller breakpoints.
Not unusual Issues To Keep away from
Forgetting to set a defined peak or minimum peak on the dad or mum container is a not unusual reason Align Content material subject matter turns out to don’t the rest. If the row peak is ready to Auto, there could also be no further cross-axis house for Align Content material subject matter to distribute. Add a minimum peak, comparable to 500px or 60vh, when the construction needs visible multi-line distribution.
Keep away from overusing No Wrap for content-heavy sections. It’ll smartly drive you to keep watch over further rows {{that a}} single wrapping Flex row would possibly handle further effectively.
Evaluation Wrap Reverse and Display Order at smaller breakpoints when the natural stacking order creates sudden visual results.
Test With Precise Content material subject matter
Test your layouts with exact content material subject matter of more than a few lengths. Placeholder content material subject matter can disguise alignment and wrapping issues that appear with precise copy, image dimensions, button labels, or link groups. Pay explicit attention to how wrapped traces behave on Tablet and Phone, then keep watch over gaps, Column Class values, Construction Wrapping, and alignment settings as sought after.
Download And Arrange The Knowledge
To help you understand Wrap vs No Wrap, we’ve created phase layouts that showcase No Wrap, Wrap, and Wrap Reverse. Each construction is classed so that you’ll inspect the development and settings inside the Visual Builder.

To get right of entry to them, fill out the form beneath and procure the zipped Wrap vs No Wrap file in your computer. Then go to Divi > Divi Library and select the Import & Export button.

Make a selection the Import tab, select the phase you’d like to import, or make a choice the Wrap VS No Wrap – ALL.json file to import all layouts. While you’ve made a selection, click on on Import Divi Builder Layouts.

Next, create a brand spanking new internet web page or open an provide one inside the Visual Builder. Click on on so that you could upload a brand spanking new phase to the internet web page.

Select the Add From Library tab and make a choice the construction you’d like to import.

Finally, click on on Use This Segment to load the phase onto the internet web page.

Wrap vs No Wrap: Construction Upper Layouts In Divi 5
With a clear figuring out of No Wrap, Wrap, and Wrap Reverse, you’ll assemble cleaner and further atmosphere pleasant layouts in Divi 5. No Wrap keeps structures predictable on a single line. Wrap lets one dad or mum container handle multi-line structures with fewer rows. Wrap Reverse gives you another choice for controlling how wrapped traces stack at explicit breakpoints.
The real power comes from combining Construction Wrapping with Column Class, Align Content material subject matter, responsive controls, and Display Order. Together, the ones settings let you assemble layouts that adapt all over computer screen sizes while holding the development more straightforward to keep watch over.
In Segment 4 of Mastering Flexbox in Divi 5, we’ll show you difficult alignment ways in which scale back the need for information spacing and custom designed code.
Download the example templates, experiment with the opposite wrapping possible choices in your tasks, and let us know inside the comments which manner you’re most excited to take a look at.
The post Phase 3 Of Mastering Flexbox: Wrap vs No-Wrap Construction Templates appeared first on Sublime Topics Weblog.



0 Comments