Part 10: Mastering Flexbox In Divi 5

by | May 15, 2026 | Etcetera | 0 comments

Welcome again to the Divi 5 Mastery Route. In Part 9, we constructed the core inside pages of the coworking website online. Now, it’s time to dig deeper into the Flexbox Layout System that helped make the ones pages conceivable.

Divi 5 brings Flexbox controls at once into the Visible Builder, so you’ll organize spacing, alignment, wrapping, and distribution with out writing customized CSS. On this publish, you’ll learn the way Flexbox works in Divi 5, what each and every primary format surroundings does, and the right way to construct a easy responsive format the use of the ones settings.

Through the tip, you’ll perceive the primary Flexbox settings and understand how to make use of them to create cleaner, better-aligned sections throughout breakpoints.

Let’s dive in.

The Energy Of Flexbox In Divi 5

Flexbox is very best for one-dimensional layouts. That suggests it arranges pieces basically in a row or a column whilst supplying you with regulate over alignment, spacing, distribution, wrapping, and order.

All the way through the coworking website online, Flexbox is helping energy navigation bars, characteristic rows, testimonial playing cards, pricing tables, hero content material, tournament rows, and extra. It’s particularly helpful when components want to line up cleanly or reply gracefully because the display dimension adjustments.

In Divi 5, Flexbox settings reside within the Design > Format choice staff for format components similar to sections, rows, columns, and teams. Those controls additionally paintings together with your Design Variables and Presets, so spacing and format alternatives can keep constant around the website online.

Flexbox settings in Divi 5

Flexbox Settings In The Divi 5 Interface

Choose a format component and move to the Design tab. Then, extend the Format choice staff to show the to be had format controls.

Here’s what each and every surroundings does and the right way to use it.

Format Taste

In Divi 5, the Format Taste surroundings permits you to choose from Block, Flex, and CSS Grid, relying at the component and format you might be enhancing.

Block is the extra conventional format taste. It comes in handy for more effective stacked layouts and legacy content material. Flex is the format taste we’ll center of attention on on this publish as a result of it’s very best for row-based and column-based alignment. CSS Grid is healthier for two-dimensional layouts the place you want extra regulate over rows and columns on the similar time.

We’ll discover CSS Grid in additional element in Section 11 of the Divi 5 Mastery Route.

To paintings with Flexbox, make a selection Flex underneath Format Taste. As soon as Flex is chosen, the Flexbox-related settings seem underneath.

Layout Style setting in Divi 5

Horizontal And Vertical Hole

Divi 5 comprises integrated Hole controls for spacing between kid components. As a substitute of including customized margin or padding to each module, you’ll set spacing as soon as on the container degree.

Horizontal Hole controls the distance between pieces positioned facet via facet.

Vertical Hole controls the distance between pieces stacked from most sensible to backside.

Each fields make stronger Advanced Units, similar to px, %, rem, and vw. You’ll additionally use Design Variables, just like the spacing values we created in Section 3.

See also  How to Include a Scroll Down Button in Your Divi Fullwidth Header Module

The use of Horizontal and Vertical Hole is without doubt one of the most straightforward techniques to stay spacing constant throughout rows, columns, and teams.

Format Course

Format Course controls the primary axis of a Flex container. In different phrases, it determines the route kid components drift.

Layout Direction setting in Divi 5

The to be had choices are:

  • Row (default): Pieces drift horizontally from left to correct.
  • Row Opposite: Pieces drift horizontally from correct to left.
  • Column: Pieces drift vertically from most sensible to backside.
  • Column Opposite: Pieces drift vertically from backside to most sensible.

Switching from Row to Column is without doubt one of the maximum not unusual Flexbox adjustments you’ll make in Divi 5. For instance, a row of characteristic blurbs can take a seat facet via facet on desktop and stack vertically on smaller displays via converting the format route on the suitable breakpoint.

Justify Content material

Justify Content material controls how pieces are dispensed alongside the primary axis of a Flex container. When the Format Course is ready to Row, it controls horizontal distribution. When the Format Course is ready to Column, it controls vertical distribution.

The to be had choices are:

  • Get started: Aligns pieces to the start of the primary axis.
  • Middle: Facilities pieces alongside the primary axis.
  • Finish: Aligns pieces to the tip of the primary axis.
  • House Between: Distributes pieces with house between them and no more room on the outer edges.
  • House Round: Provides house round each and every merchandise.
  • House Calmly: Provides equivalent house between pieces and on the outer edges.

One frequently used choice is House Between. It really works smartly for headers and navigation layouts the place you need an emblem on one facet and Link modules, buttons, or different navigation components at the different.

Justify Content setting in Divi 5

Align Pieces

Align Pieces controls how kid components align alongside the cross-axis. In Row route, it controls vertical alignment. In Column route, it controls horizontal alignment.

The principle choices are:

  • Get started: Aligns pieces to the beginning of the cross-axis.
  • Middle: Facilities pieces alongside the cross-axis.
  • Finish: Aligns pieces to the tip of the cross-axis.
  • Stretch: Stretches pieces around the to be had cross-axis house.

Stretch is particularly helpful for card layouts. When the mother or father container lets in it, Stretch is helping kid components fit the to be had peak, making playing cards glance extra balanced when their content material lengths range.

Align Items setting in Divi 5

Format Wrapping

Format Wrapping determines whether or not Flex pieces keep on one line or wrap to further strains when there isn’t enough space.

Layout Wrapping setting in Divi 5

The to be had choices are:

  • No Wrap: Helps to keep pieces on a unmarried line.
  • Wrap: Permits pieces to transport to further strains when house runs out.
  • Wrap Opposite: Permits pieces to wrap within the opposite route.

Wrapping is necessary for responsive design as it shall we layouts adapt naturally because the to be had width adjustments. For instance, a row of playing cards can seem in more than one columns on desktop after which wrap into fewer columns on smaller displays.

Align Content material

Align Content material controls how wrapped strains align alongside the cross-axis when there may be more room within the container. It most effective turns into related when Format Wrapping is ready to Wrap or Wrap Opposite and the container has more than one strains of things.

Its choices are very similar to Justify Content material and come with Stretch, Get started, Middle, Finish, House Between, House Round, and House Calmly.

Align Content material is most valuable in multi-line Flex layouts. For instance, if a card format wraps to 2 or extra rows and the container has further peak, Align Content material can regulate how the ones rows take a seat throughout the to be had house.

Align Content setting in Divi 5

Development A Format With Flexbox

Now, let’s use those Flexbox settings to create a easy three-column format. Get started via including a brand new three-column Row to a web page. Within the Design tab, extend the Format choice staff and ensure that Flex is chosen within the Format Taste dropdown.

See also  What Responsive Show Advertisements Are + The way to Create Them [Step-by-Step]

Three-column Flex Row in Divi 5

Set The Row Hole

Subsequent, alter the Horizontal and Vertical Hole for the Row. Hover over the Horizontal Hole box to show the Insert Dynamic Content material icon.

Insert Dynamic Content icon in Divi 5

Choose the Spacing – Medium variable from the record and observe it.

Apply a Design Variable in Divi 5

Repeat the similar procedure for the Vertical Hole box.

Taste The Columns

Subsequent, upload spacing and border types to each and every Column. Get started via enhancing the primary Column.

Edit a Column in Divi 5

Cross to the Design tab and extend the Spacing choice staff. Click on the Hyperlink icon within the Padding box so all 4 facets keep hooked up. Then, use the Insert Dynamic Content material icon to use the Spacing – Small variable to the padding price.

Subsequent, hover over the Border choice staff to show the Assign Presets icon. Assign the Defined – Darkish Option Group Preset.

Reproduction Column Kinds With Attributes

Now that the primary Column has the right kind spacing and border types, use Divi’s right-click Attributes menu to use the ones types to the rest Columns.

Proper-click the primary Column within the canvas and make a selection Reproduction Attributes.

Copy Attributes in Divi 5

Subsequent, right-click the second one Column. When the Attributes menu seems, make a selection Paste Attributes, then select Paste Column Design Attributes. This copies the design-related types from the primary Column and applies them to the second one.

After all, right-click the 3rd Column and paste the similar design attributes once more.

Paste Column Design Attributes in Divi 5

Upload Content material To The Columns

Now, upload content material to the primary Column. Get started with a Module Group. Within the Workforce, upload two Heading modules, one Textual content module, and one Divider module.

Out of doors the Workforce, however nonetheless throughout the first Column, upload an Icon Listing module and a Button module. Use the Presets and Variables created previous within the direction to stay the design constant.

Fill the rest Columns with identical content material. Sooner than making use of extra Flexbox settings, the format must glance very similar to the picture underneath.

Three-column content layout in Divi 5

Modify Workforce And Column Gaps

Get started via adjusting the vertical spacing inside of each and every Workforce. Open the primary Column’s Workforce module and move to the Design tab. Make bigger the Format choice staff and observe the Spacing – XSmall variable to the Vertical Hole box. Repeat the similar procedure for the rest Teams.

Use a spacing variable with Module Groups in Divi 5

Subsequent, open the primary Column’s settings and move to the Design tab. Make bigger the Format choice staff and observe the Spacing – Small variable to the Vertical Hole box. Repeat the similar procedure for the rest Columns.

Apply a small Vertical Gap to a Column in Divi 5

Align The Buttons

At this level, the highest of the format is aligned, however the Button modules on the backside of each and every Column would possibly not line up since the content material lengths range. To mend that, alter the Justify Content material surroundings at the Columns that want it.

Within the first Column, set Justify Content material to House Between. This assists in keeping the Workforce module on the most sensible of the Column whilst pushing the Button module to the ground.

Repeat the similar adjustment for the 3rd Column. As soon as House Between is implemented the place wanted, the Button modules align extra constantly around the Row.

Use Justify Content in Columns to align buttons in Divi 5

Make Responsive Changes

Sooner than completing the format, test the way it responds throughout other display sizes. Divi 5 offers you a number of gear for this, together with Construction Templates, Customizable Responsive Breakpoints, and the Responsive Editor.

If you wish to check extra display widths, open the breakpoint controls within the Most sensible Bar and permit the extra breakpoints you want. Divi 5 helps as much as seven customizable breakpoints.

Subsequent, open the Row containing the three-column format. Cycle during the energetic breakpoints to look how the format behaves. When a breakpoint wishes adjustment, use Practice Construction Template within the Components choice staff to modify the Row construction for that display dimension.

See also  WordPress Upkeep For Nonprofits » Holding Your Idaho Nonprofit’s Web site…

You’ll additionally use the Responsive Editor to regulate Column alignment when the Columns stack vertically. Open the primary Column’s settings, move to the Design tab, and extend the Format choice staff.

Hover over the Align Pieces box to show the Edit Responsive Values icon. Choose it and set Align Pieces to Middle on the related breakpoint. Repeat the similar procedure for the rest Columns.

Tremendous-Music Column Widths

After the Columns are aligned, you might have considered trying extra regulate over their widths. For instance, on the Pill Extensive breakpoint, the stacked format would possibly depart extra white house than you need.

Extra white space in a responsive Divi 5 column layout

To regulate a Column’s width, open the Column settings and move to the Design tab. Make bigger the Sizing choice staff and find the Column Magnificence box. Click on the dropdown caret throughout the box to show the choices.

Column Class field in Divi 5

Make a selection 1/2 from the to be had choices.

Reorder Components Responsively

Now and again, the visible order you need on desktop isn’t very best on cellular. Divi 5 permits you to alter show order from the Order choice staff.

Click on into the 3rd Column within the format. Make bigger the Order choice staff to show the Show Order box.

Display Order field in Divi 5

Environment the sector to -1 strikes the 3rd Column previous within the Row’s visible order on the breakpoint the place that price is implemented.

Guidelines And Best possible Practices

Now that you’ve got constructed a Flexbox format, listed below are a couple of techniques to paintings quicker and get extra predictable ends up in Divi 5.

Get started With Hole Controls

Use Horizontal Hole and Vertical Hole ahead of including customized margins to particular person modules. Environment spacing on the container degree creates extra constant rhythm throughout rows, columns, and teams.

Control spacing with Gap settings in Divi 5

Use House Between For Card Layouts

Justify Content material > House Between comes in handy when you need content material to sit down on the most sensible of a card and a button to stick aligned close to the ground. This works particularly smartly when playing cards have other quantities of textual content.

Use Justify Content Space Between in Divi 5

Use Stretch For Equivalent-Peak Playing cards

For equal-height components, similar to characteristic blurbs, pricing playing cards, or carrier playing cards, use Align Pieces > Stretch at the mother or father container when suitable. It will lend a hand kid components percentage a constant peak.

Use Align Items Stretch in Divi 5

Use Design Variables For Spacing

Mix Flexbox settings with the Design Variables you created previous within the direction. When hole, padding, and width values reference variables, format updates are more straightforward to control later.

Design Variables in Divi 5

What’s Coming Subsequent

On this a part of the Divi 5 Mastery Route, you realized how Flexbox controls spacing, alignment, route, wrapping, and distribution inside of Divi 5. You additionally constructed a three-column format that makes use of hole controls, Design Variables, Characteristic Control, responsive construction adjustments, and show order.

Subsequent, in Section 11, we’ll discover two-dimensional layouts with CSS Grid. You’ll be informed when Grid is a greater have compatibility than Flexbox and the way the 2 techniques paintings in combination for contemporary internet design.

When you’ve got now not already, download the latest version of Divi 5, discover Flexbox, and get started development. Tell us what you suppose via leaving a remark underneath or attaining out on our social media channels.

The publish Part 10: Mastering Flexbox In Divi 5 seemed first on Elegant Themes Blog.

WordPress Maintenance Plans | WordPress Hosting

read more

0 Comments

Submit a Comment

DON'T LET YOUR WEBSITE GET DESTROYED BY HACKERS!

Get your FREE copy of our Cyber Security for WordPress® whitepaper.

You'll also get exclusive access to discounts that are only found at the bottom of our WP CyberSec whitepaper.

You have Successfully Subscribed!