Probably the most treasured enhancements in Divi 5 is its local Flexbox beef up. It offers you blank, visible regulate over format construction at once within the Visible Builder, lowering the will for customized CSS, duplicated sections, or handbook spacing workarounds.
That is the primary a part of our Mastering Flexbox sequence. All the way through the sequence, we’ll introduce Flexbox in Divi 5, discover its settings intimately, and display how other controls paintings in combination to create practical, responsive designs. In Section 2, we’ll display you learn how to create equal-height playing cards with aligned buttons.
On this first section, we’ll focal point at the settings to be had within the Structure choice staff when Flex is chosen. Those controls have an effect on how kid components drift, wrap, align, and distribute area inside of a dad or mum container, making them one of the vital maximum vital format gear you’ll use in Divi 5.
Let’s dive in.
What Is Flexbox In Divi 5?
Flexbox (Versatile Field Structure) is a CSS format type designed to organize, align, and distribute area between pieces inside of a container, even if the ones pieces have other or dynamic sizes.
Ahead of Divi 5, growing balanced layouts in Divi frequently supposed depending at the conventional segment > row > column construction, then fine-tuning spacing with margin, padding, or customized CSS. That way labored, however it would make responsive alignment tougher to regulate throughout breakpoints.
Divi 5 adjustments this via bringing local Flexbox controls at once into the Visible Builder. As a substitute of writing CSS for commonplace format conduct, you’ll set up path, spacing, wrapping, alignment, and ordering visually.
Key Advantages Of Flexbox In Divi 5
Visible Structure Controls: Flexbox controls are positioned within the Structure choice staff within the Design tab. Relying at the component you’re enhancing, you’ll use them on sections, rows, columns, and modules that act as boxes.

Responsive Layouts With out Customized CSS: You’ll alter Flexbox settings throughout desktop, pill, and cellular breakpoints, serving to layouts adapt naturally with out duplicating content material or writing customized media queries.
Works Throughout Bins And Modules: Flexbox isn’t restricted to rows and columns. You’ll observe Flexbox conduct to supported components during the Visible Builder, together with Module Teams, Blurbs, Buttons, and different module-based layouts.

An Review Of Flexbox Settings In Divi 5
Maximum Flexbox controls are living within the Structure choice staff, however two significant other options outdoor that staff are particularly helpful when construction responsive Flex layouts:
Column Elegance
The Column Elegance dropdown within the Sizing choice staff allows you to regulate person column widths inside of a Flex row. For instance, you’ll set a column to span 1/3 width on desktop, 1/2 width on pill, and entire width on cellular.

Show Order
Divi 5 contains visible ordering controls within the Order settings of a person column’s Content material tab. This is helping you regulate responsive stacking patterns with out duplicating sections.
For instance, alternating desktop sections comparable to Textual content-Symbol / Symbol-Textual content can stack awkwardly on smaller monitors, every so often striking photographs back-to-back.
By way of adjusting the numeric Show Order collection in line with breakpoint, you’ll regulate the visible stack whilst maintaining one blank format construction.
Under is a breakdown of the most important Flexbox settings within the Structure choice staff, with explanations and sensible examples.
Structure Possibility Crew
The Structure choice staff is the place you’ll spend maximum of your time when running with Flexbox in Divi 5. As soon as you choose Flex because the Structure Taste, the builder unearths controls that map to local CSS Flexbox conduct.

Horizontal & Vertical Hole
Hole is the cleanest means so as to add constant area between flex pieces. As a substitute of including margin to each and every merchandise in my view, you’ll observe spacing as soon as on the dad or mum stage.
Horizontal Hole controls the horizontal area between flex pieces.
Vertical Hole controls the vertical area between stacked pieces or wrapped traces.
You’ll use Divi 5’s Complex Devices, together with px, %, em, rem, vw, clamp(), calc(), and extra, to create fluid, responsive spacing values.

You’ll additionally use Divi 5’s Variable Generator to create a fluid sizing device. That makes it more uncomplicated to reuse constant spacing values throughout gaps, padding, margins, and different numeric design settings.

Tip: Get started with small hole values and build up them are living within the builder. You’ll see how temporarily constant spacing improves the rhythm of a format.
Structure Route
Structure Route determines the path wherein kid components drift inside of a flex container. Underneath the hood, this maps to the CSS flex-direction belongings.
Row and Row Opposite permit pieces to drift horizontally.

Column and Column Opposite permit pieces to drift vertically.

Converting the format path additionally adjustments how alignment settings behave, for the reason that primary axis and pass axis exchange with it. You’ll alter Structure Route in line with breakpoint, which turns out to be useful when you wish to have a horizontal desktop format to stack vertically on cellular.
For instance, many cellular layouts will have to stack vertically. On the other hand, some small components, comparable to weblog put up class tags or social media icons, frequently paintings higher after they stay horizontal.
As noticed within the screenshot beneath, atmosphere the dad or mum Crew module to handle a horizontal Row path on the cellular breakpoint assists in keeping put up tags aligned side-by-side as a substitute of stacking right into a vertical checklist.

Figuring out The Flexbox Axes
Ahead of you alter alignment, it is helping to know one core Flexbox idea: the principle axis and pass axis exchange while you exchange path.
In a Row, the principle axis runs horizontally, so pieces drift left to correct via default. In a Column, the principle axis runs vertically, so pieces drift peak to backside via default.
To make this totally visible, take a look at how the drift of components adjustments between the 2 number one instructions:

Justify Content material
While you’ve selected a path, Justify Content material controls how pieces distribute alongside the principle axis.
Get started
This selection puts pieces firstly of the principle axis. In a Row format, content material begins at the left in a typical left-to-right format. In a Column format, pieces get started on the peak. Use this as a baseline for same old textual content blocks, weblog feeds, and easy content material teams.

Heart
This selection gathers pieces towards the middle of the principle axis, leaving final area on all sides. It really works neatly for hero content material, focused calls to motion, and emblem or icon rows.

Finish
This selection puts pieces on the finish of the principle axis. In a horizontal row, pieces transfer towards the appropriate edge in a typical left-to-right format. In a vertical column, pieces transfer towards the ground. Use it for right-aligned button teams, compact navigation layouts, or footer content material that wishes to sit down on the finish of its container.

Area Between
This selection distributes pieces from edge to edge. The primary merchandise sits at the beginning of the container, the final thing sits on the finish, and the rest area is shipped between the pieces. It’s particularly helpful for header menus and layouts the place reverse ends wish to keep anchored.

Area Round
This selection provides area round each and every merchandise. As a result of each and every merchandise receives area on all sides, the gaps between internal pieces seem larger than the distance on the outer edges. Use it when you wish to have a looser, extra open format.

Area Flippantly
This selection creates equivalent area between all pieces and the outer edges of the container. Not like Area Round, the periphery spacing suits the spacing between pieces. Use it for balanced icon rows, characteristic lists, or calmly disbursed navigation pieces.

Align Pieces
Whilst Justify Content material controls alignment alongside the principle axis, Align Pieces controls alignment alongside the pass axis. In a Row format, that in most cases method vertical alignment. In a Column format, that in most cases method horizontal alignment.
Get started
This selection aligns pieces to the start of the pass axis. In a typical horizontal row, pieces line up alongside the highest fringe of the container. Use it for text-heavy layouts or mixed-media grids the place a constant peak baseline issues.

Heart
This selection facilities pieces alongside the pass axis. It’s particularly helpful when aligning a picture subsequent to textual content, centering buttons beside reproduction, or balancing mixed-height modules inside of the similar row.

Finish
This selection aligns pieces to the tip of the pass axis. In a horizontal row, pieces align alongside the ground fringe of the container. This turns out to be useful when more than one pieces wish to percentage a grounded visible baseline.

Stretch
This selection stretches flex pieces around the to be had cross-axis area when their dimension permits it. It turns out to be useful for card grids, pricing sections, and layouts the place columns or playing cards wish to seem visually equivalent in peak.

The important thing distinction between Justify Content material and Align Pieces is that Justify Content material works alongside the principle axis, whilst Align Pieces works alongside the pass axis. The visual end result adjustments relying on whether or not your Structure Route is Row or Column.
Tip: Use Stretch when you wish to have playing cards or modules to percentage a constant peak. Use Finish when pieces wish to align alongside the ground edge. For pricing tables with buttons aligned on the backside, mix equal-height playing cards with inner Flexbox settings inside of each and every card.

Structure Wrapping
Structure Wrapping controls whether or not flex pieces keep on one line or transfer onto further traces when there isn’t sufficient room.
No Wrap
This default conduct assists in keeping all pieces on one flex line. Relying at the merchandise settings and to be had area, pieces would possibly shrink, overflow, or develop into too compressed. Use No Wrap deliberately for compact button bars, horizontal toolbars, or layouts that are meant to stay on a unmarried line.

Wrap
This selection permits pieces to transport onto a brand new line after they outgrow the to be had width. It is likely one of the most valuable settings for responsive card grids, testimonial sections, characteristic rows, and tag clouds.

Wrap Opposite
This selection permits pieces to wrap, however reverses the path wherein new flex traces are positioned alongside the pass axis. It does now not opposite the order of each person merchandise; as a substitute, it adjustments the place the wrapped traces seem. Use it while you deliberately want wrapped traces to stack in the wrong way.

Align Content material
Align Content material controls how more than one flex traces distribute alongside the pass axis. This atmosphere best has a visual impact when Structure Wrapping is enabled, the pieces wrap onto more than one traces, and the container has further cross-axis area.
The to be had choices reflect your core distribution settings however observe to whole traces as a substitute of person pieces.
Stretch
This selection stretches wrapped traces to fill to be had cross-axis area. Use it when you wish to have multi-row card grids or wrapped layouts to really feel extra calmly disbursed.

Get started
This selection teams wrapped traces firstly of the pass axis, leaving more space on the finish. It turns out to be useful for same old multi-line grids the place content material will have to keep anchored close to the highest.

Heart
This selection facilities the wrapped traces within the to be had cross-axis area. Use it when a wrapped format wishes a balanced presentation inside of a taller container.

Finish
This selection puts wrapped traces on the finish of the pass axis, leaving more space earlier than them. It really works neatly for bottom-aligned format sections or structural footer components.

Area Between
This selection puts the primary wrapped line at the beginning, the final wrapped line on the finish, and distributes the rest area between the traces. It turns out to be useful when you wish to have wrapped rows to occupy the total peak of a container.

Area Round
This selection provides area round each and every wrapped line. The gap between internal traces seems higher than the distance on the outer edges as a result of each and every line receives area on all sides.

Area Flippantly
This selection creates equivalent spacing between each wrapped line and the outer edges of the container. Use it when your format wishes constant, symmetrical spacing from peak to backside.

Easy difference:
- Align Pieces aligns person pieces inside of each and every flex line.
- Align Content material aligns the flex traces themselves when content material wraps onto more than one traces.
Within the instance beneath, Structure Wrapping is enabled with Align Content material set to Area Between.

How Those Controls Paintings In combination
Figuring out each and every Flexbox atmosphere in my view is beneficial, however the actual energy comes from combining them. Flexbox is highest for one-dimensional layouts, the place you basically regulate pieces alongside a row or a column. For strict two-dimensional layouts that require detailed row and column placement on the identical time, CSS Grid is also a greater are compatible.
Under are 5 sensible examples that display how Divi 5 Flexbox settings paintings in combination in actual layouts.
1. Easy Horizontal Card Row
A commonplace use case for Flexbox is growing rows of characteristic playing cards, testimonials, pricing tables, or blurbs.
On this instance, the dad or mum row makes use of a Horizontal Hole and Vertical Hole of 20px to create constant area between the playing cards. Structure Wrapping is ready to Wrap, so playing cards can transfer to new traces when there isn’t sufficient room. Align Content material is ready to Stretch to lend a hand the wrapped rows fill the to be had area extra calmly.
On the column stage, each and every card makes use of the Column Elegance atmosphere: 1/3 on desktop for 3 columns, 1/2 on pill for 2 columns, and Fullwidth on cellular for a single-column stack.
This mix creates a blank, balanced, and reusable responsive card format.

2. Primary Content material Structure With A Vertical Sidebar
This two-column format includes a narrower sidebar at the left and a much wider content material house at the correct, which matches neatly for weblog posts, documentation pages, and useful resource layouts.
The principle row makes use of a percentage-based horizontal hole and switches from Row to Column on smaller monitors for a herbal stacked enjoy. The sidebar makes use of nested Module Teams with Row path and small Horizontal Gaps to prepare textual content hyperlinks and buttons. One button staff makes use of Justify Content material: Finish to push the buttons to the a ways fringe of its container.
The principle content material column makes use of Vertical Hole settings and nested Teams with wrapping rows of buttons and content material blocks. This displays how Flexbox may also be carried out at more than one ranges, from row to column to module staff, to create arranged layouts with out customized CSS.

3. Hero Segment
Hero sections are probably the most vital portions of a homepage, and Flexbox makes it more uncomplicated to steadiness textual content, buttons, imagery, and supporting stats.
This case makes use of two stacked rows inside of a piece. The primary row comprises two columns and makes use of Align Pieces: Heart so the textual content and visible content material align vertically. The left column additionally makes use of a 15px Vertical Hole to create constant spacing between the heading, reproduction, and buttons.
The second one row comprises six Quantity Counter modules. On desktop, the column makes use of Structure Route: Row and Justify Content material: Area Between to unfold the counters around the to be had width. On smaller monitors, Structure Wrapping permits the counters to wrap into more than one traces whilst keeping up balanced spacing.
The result’s a hero format with focused content material, constant spacing, and responsive statistics that stay simple to scan.

4. Pricing Tables
Pricing tables are a powerful Flexbox use case as a result of they frequently want equal-height playing cards, aligned content material, and constant spacing between plans.
On this instance, a unmarried row comprises 4 pricing columns. On the row stage, a 20px Horizontal Hole creates blank separation between playing cards, whilst Align Pieces: Stretch is helping the columns percentage a constant peak when their settings permit it.
Inside of each and every pricing column, nested Module Teams care for the inner format. The highest staff makes use of a small Vertical Hole for the plan title and value house. The associated fee segment makes use of Structure Route: Row and Align Pieces: Heart to align the foreign money image and value at the identical line.
To stay buttons aligned on the backside, use an inner vertical format inside of each and every card and distribute the cardboard content material deliberately, reasonably than depending best at the dad or mum row. This assists in keeping each and every pricing plan balanced even if characteristic lists have other lengths.

5. Tag Cloud
Tag clouds are a good way to show many hyperlinks or subjects in a compact, visually enticing structure.
On this instance, a unmarried column comprises 15 Textual content modules styled as colourful tags. On the Textual content module stage, each and every tag makes use of Structure Route: Row Opposite, Justify Content material: Heart, and a small 10px Horizontal Hole. This assists in keeping the tag label and icon aligned as a compact horizontal unit.
On the Column stage, a good 8px Horizontal Hole and 8px Vertical Hole are carried out, with each Justify Content material and Align Pieces set to Heart. Structure Wrapping is enabled so the tags can drift onto more than one traces, and Align Content material is ready to Area Between to distribute the wrapped rows within the to be had area.
The result’s a dynamic tag cloud that wraps cleanly and avoids awkward gaps.

Obtain And Set up The Information
That will help you perceive the whole thing coated on this put up, we’ve created a at hand Flexbox settings information you’ll reference. It items the Flexbox settings visually and contains a couple of segment layouts that will help you get began.
To make use of the information, fill out the shape beneath to obtain the ZIP report. As soon as downloaded, move to the WordPress dashboard, click on Divi > Divi Library, and make a choice the Import & Export button.

Click on the Import tab, find the Mastering Flexbox Settings JSON report in your laptop, and make a choice Import Divi Builder Layouts.

From there, create and open a brand new web page within the Visible Builder. Click on the blue + icon on the peak of the Builder Bar within the left sidebar.

When the Insert Structure modal seems, make a choice Stored Structure from the to be had choices.

Make a selection the Mastering Flexbox Settings format to import it into the Canvas.
Get Began With Flexbox In Divi 5
With a transparent figuring out of the core Flexbox settings in Divi 5, you’ll construct cleaner, extra responsive layouts at once within the Visible Builder. By way of combining Structure Route, Hole, Justify Content material, Align Pieces, Structure Wrapping, Align Content material, Column Elegance, and Show Order, you’ll create the whole thing from easy card rows to complicated nested layouts.
For those who’d love to take your Flexbox abilities additional, proceed with Section 2 of our Mastering Flexbox sequence. We’ll display you learn how to create polished card layouts the place content material and buttons align constantly throughout each card.
For those who haven’t already, obtain the most recent model of Divi 5, import the Flexbox settings information, and get started experimenting with Flexbox on your personal tasks. The extra you employ those controls, the extra herbal they’ll really feel. Drop a remark beneath or succeed in out to us on our social media channels to tell us which Flexbox atmosphere you’re maximum excited to make use of.
The put up Section 1 Of Mastering Flexbox: Figuring out The Core Controls In Divi 5 seemed first on Chic Topics Weblog.
WordPress Web Design

