Welcome once more to the Divi 5 Mastery Path. In Phase 9, we built the core inside of pages of the coworking website online. Now, it’s time to dig deeper into the Flexbox Structure Machine that helped make those pages conceivable.
Divi 5 brings Flexbox controls directly into the Visual Builder, so that you’ll be capable to prepare spacing, alignment, wrapping, and distribution without writing custom designed CSS. In this post, you’ll learn how Flexbox works in Divi 5, what every major structure setting does, and simple the best way to assemble a simple responsive structure using those settings.
By way of the highest, you’ll understand the primary Flexbox settings and understand how to use them to create cleaner, better-aligned sections all through breakpoints.
Let’s dive in.
The Power Of Flexbox In Divi 5
Flexbox could be very easiest for one-dimensional layouts. That means it arranges items necessarily in a row or a column while providing you with regulate over alignment, spacing, distribution, wrapping, and order.
Throughout the coworking website online, Flexbox helps power navigation bars, function rows, testimonial enjoying playing cards, pricing tables, hero content material subject matter, match rows, and additional. It’s in particular useful when portions wish to line up cleanly or answer gracefully since the visual display unit size changes.
In Divi 5, Flexbox settings reside inside the Design > Construction chance crew for structure portions similar to sections, rows, columns, and groups. The ones controls moreover artwork in conjunction with your Design Variables and Presets, so spacing and structure imaginable alternatives can stay consistent across the internet web page.

Flexbox Settings In The Divi 5 Interface
Choose a structure section and pass to the Design tab. Then, make larger the Construction chance crew to turn the available structure controls.
Right here’s what every setting does and simple the best way to use it.
Construction Style
In Divi 5, the Construction Style setting allows you to choose from Block, Flex, and CSS Grid, depending on the section and structure you may well be editing.
Block is the additional typical structure style. It is useful for more practical stacked layouts and legacy content material subject matter. Flex is the structure style we’ll focal point on in this post on account of it’s very good for row-based and column-based alignment. CSS Grid is more healthy for two-dimensional layouts where you wish to have additional regulate over rows and columns at the an identical time.
We’ll uncover CSS Grid in more component in Section 11 of the Divi 5 Mastery Path.
To artwork with Flexbox, make a choice Flex beneath Construction Style. Once Flex is selected, the Flexbox-related settings appear underneath.

Horizontal And Vertical Hollow
Divi 5 incorporates built-in Hollow controls for spacing between child portions. As a substitute of together with custom designed margin or padding to every module, you’ll be capable to set spacing once at the container degree.
Horizontal Hollow controls the space between items situated side via side.
Vertical Hollow controls the space between items stacked from best to bottom.
Each and every fields strengthen Complicated Gadgets, similar to px, %, rem, and vw. You’ll moreover use Design Variables, identical to the spacing values we created in Section 3.
Using Horizontal and Vertical Hollow is one of the most straightforward ways to stick spacing consistent all through rows, columns, and groups.
Construction Path
Construction Path controls the primary axis of a Flex container. In numerous words, it determines the direction child portions flow.

The available alternatives are:
- Row (default): Items flow horizontally from left to proper.
- Row Reverse: Items flow horizontally from proper to left.
- Column: Items flow vertically from best to bottom.
- Column Reverse: Items flow vertically from bottom to best.
Switching from Row to Column is one of the most now not strange Flexbox changes you’ll make in Divi 5. For example, a row of function blurbs can sit down down side via side on desktop and stack vertically on smaller shows via changing the structure direction at the appropriate breakpoint.
Justify Content material subject matter
Justify Content material subject matter controls how items are distributed along the primary axis of a Flex container. When the Construction Path is set to Row, it controls horizontal distribution. When the Construction Path is set to Column, it controls vertical distribution.
The available alternatives are:
- Get began: Aligns items to the beginning of the primary axis.
- Middle: Amenities items along the primary axis.
- End: Aligns items to the highest of the primary axis.
- Space Between: Distributes items with area between them and less room at the outer edges.
- Space Spherical: Supplies area spherical every products.
- Space Lightly: Supplies identical area between items and at the outer edges.
One regularly used chance is Space Between. It in reality works smartly for headers and navigation layouts where you want a logo on one side and Hyperlink modules, buttons, or other navigation portions on the other.

Align Items
Align Items controls how child portions align along the cross-axis. In Row direction, it controls vertical alignment. In Column direction, it controls horizontal alignment.
The primary alternatives are:
- Get began: Aligns items to the start of the cross-axis.
- Middle: Amenities items along the cross-axis.
- End: Aligns items to the highest of the cross-axis.
- Stretch: Stretches items across the available cross-axis area.
Stretch is especially useful for card layouts. When the daddy or mom container allows it, Stretch helps child portions have compatibility the available height, making enjoying playing cards look additional balanced when their content material subject matter lengths vary.

Construction Wrapping
Construction Wrapping determines whether or not or now not Flex items stay on one line or wrap to additional strains when there isn’t enough room.

The available alternatives are:
- No Wrap: Assists in keeping items on a single line.
- Wrap: We could in items to move to additional strains when area runs out.
- Wrap Reverse: We could in items to wrap inside the reverse direction.
Wrapping is very important for responsive design because it shall we layouts adapt naturally since the available width changes. For example, a row of enjoying playing cards can appear in a couple of columns on desktop and then wrap into fewer columns on smaller shows.
Align Content material subject matter
Align Content material subject matter controls how wrapped strains align along the cross-axis when there’s extra space inside the container. It simplest becomes connected when Construction Wrapping is set to Wrap or Wrap Reverse and the container has a couple of strains of items.
Its alternatives are similar to Justify Content material subject matter and include Stretch, Get began, Middle, End, Space Between, Space Spherical, and Space Lightly.
Align Content material subject matter is maximum really helpful in multi-line Flex layouts. For example, if a card structure wraps to two or additional rows and the container has further height, Align Content material subject matter can regulate how those rows sit down down throughout the available area.

Building A Construction With Flexbox
Now, let’s use the ones Flexbox settings to create a simple three-column structure. Get began via together with a brand spanking new three-column Row to a internet web page. Inside the Design tab, make larger the Construction chance crew and make sure that Flex is selected inside the Construction Style dropdown.

Set The Row Hollow
Next, regulate the Horizontal and Vertical Hollow for the Row. Hover over the Horizontal Hollow field to turn the Insert Dynamic Content material subject matter icon.

Choose the Spacing – Medium variable from the tick list and apply it.

Repeat the an identical process for the Vertical Hollow field.
Style The Columns
Next, add spacing and border sorts to every Column. Get began via editing the principle Column.

Go to the Design tab and make larger the Spacing chance crew. Click on at the Link icon inside the Padding field so all 4 aspects stay attached. Then, use the Insert Dynamic Content material subject matter icon to make use of the Spacing – Small variable to the padding value.
Next, hover over the Border chance crew to turn the Assign Presets icon. Assign the Outlined – Dark Possibility Staff Preset.
Copy Column Sorts With Attributes
Now that the principle Column has the proper spacing and border sorts, use Divi’s right-click Attributes menu to make use of those sorts to the remainder Columns.
Right kind-click the principle Column inside the canvas and make a choice Copy Attributes.

Next, right-click the second Column. When the Attributes menu turns out, make a choice Paste Attributes, then choose Paste Column Design Attributes. This copies the design-related sorts from the principle Column and applies them to the second.
Finally, right-click the third Column and paste the an identical design attributes another time.

Add Content material subject matter To The Columns
Now, add content material subject matter to the principle Column. Get began with a Module Staff. Right through the Body of workers, add two Heading modules, one Text module, and one Divider module.
Outside the Body of workers, on the other hand however all through the primary Column, add an Icon Tick list module and a Button module. Use the Presets and Variables created earlier inside the trail to stick the design consistent.
Fill the remainder Columns with an identical content material subject matter. Forward of constructing use of additional Flexbox settings, the structure will have to look similar to the image underneath.

Control Body of workers And Column Gaps
Get began via adjusting the vertical spacing inside every Body of workers. Open the principle Column’s Body of workers module and pass to the Design tab. Building up the Construction chance crew and apply the Spacing – XSmall variable to the Vertical Hollow field. Repeat the an identical process for the remainder Groups.

Next, open the principle Column’s settings and pass to the Design tab. Building up the Construction chance crew and apply the Spacing – Small variable to the Vertical Hollow field. Repeat the an identical process for the remainder Columns.

Align The Buttons
At this degree, the absolute best of the structure is aligned, on the other hand the Button modules at the bottom of every Column won’t line up given that content material subject matter lengths vary. To fix that, regulate the Justify Content material subject matter setting on the Columns that need it.
Inside the first Column, set Justify Content material subject matter to Space Between. This assists in keeping the Body of workers module at the best of the Column while pushing the Button module to the bottom.
Repeat the an identical adjustment for the third Column. Once Space Between is performed where sought after, the Button modules align additional continuously across the Row.

Make Responsive Adjustments
Forward of finishing the structure, take a look at how it responds all through different visual display unit sizes. Divi 5 will provide you with numerous equipment for this, along side Building Templates, Customizable Responsive Breakpoints, and the Responsive Editor.
If you want to try additional visual display unit widths, open the breakpoint controls inside the Best possible Bar and allow the additional breakpoints you wish to have. Divi 5 is helping up to seven customizable breakpoints.
Next, open the Row containing the three-column structure. Cycle for the duration of the full of life breakpoints to see how the structure behaves. When a breakpoint needs adjustment, use Follow Building Template inside the Elements chance crew to switch the Row development for that visual display unit size.
You’ll moreover use the Responsive Editor to control Column alignment when the Columns stack vertically. Open the principle Column’s settings, pass to the Design tab, and make larger the Construction chance crew.
Hover over the Align Items field to turn the Edit Responsive Values icon. Choose it and set Align Items to Middle at the connected breakpoint. Repeat the an identical process for the remainder Columns.
High quality-Track Column Widths
After the Columns are aligned, you may have regarded as attempting additional regulate over their widths. For example, at the Tablet Huge breakpoint, the stacked structure would in all probability go away additional white area than you want.

To control a Column’s width, open the Column settings and pass to the Design tab. Building up the Sizing chance crew and in finding the Column Class field. Click on at the dropdown caret all through the field to turn the selections.

Choose 1/2 from the available alternatives.
Reorder Elements Responsively
Now and again, the visual order you want on desktop isn’t very good on mobile. Divi 5 means that you can regulate display order from the Order chance crew.
Click on on into the third Column inside the structure. Building up the Order chance crew to turn the Display Order field.

Surroundings the field to -1 moves the third Column earlier inside the Row’s visual order at the breakpoint where that value is performed.
Tips And Highest Practices
Now that you simply’ve were given built a Flexbox structure, listed below are a few ways to artwork faster and get additional predictable results in Divi 5.
Get began With Hollow Controls
Use Horizontal Hollow and Vertical Hollow previous to together with custom designed margins to individual modules. Surroundings spacing at the container degree creates additional consistent rhythm all through rows, columns, and groups.

Use Space Between For Card Layouts
Justify Content material subject matter > Space Between is useful when you want content material subject matter to sit down down at the best of a card and a button to stay aligned just about the bottom. This works in particular smartly when enjoying playing cards produce other amounts of text.

Use Stretch For Identical-Height Enjoying playing cards
For equal-height portions, similar to function blurbs, pricing enjoying playing cards, or service enjoying playing cards, use Align Items > Stretch on the father or mom container when appropriate. This may increasingly have the same opinion child portions share a relentless height.

Use Design Variables For Spacing
Combine Flexbox settings with the Design Variables you created earlier inside the trail. When hollow, padding, and width values reference variables, structure updates are easier to control later.

What’s Coming Next
In this part of the Divi 5 Mastery Path, you learned how Flexbox controls spacing, alignment, direction, wrapping, and distribution inside Divi 5. You moreover built a three-column structure that uses hollow controls, Design Variables, Feature Regulate, responsive development changes, and display order.
Next, in Section 11, we’ll uncover two-dimensional layouts with CSS Grid. You’ll be informed when Grid is a better are compatible than Flexbox and the way in which the two ways artwork together for modern web design.
If if in case you have no longer already, obtain the newest model of Divi 5, uncover Flexbox, and get began development. Let us know what you assume via leaving a commentary underneath or achieving out on our social media channels.
The post Phase 10: Mastering Flexbox In Divi 5 seemed first on Sublime Topics Weblog.


0 Comments