Responsive grids shouldn’t require dozens of media queries and customized CSS overrides. However till lately, that’s precisely what maximum web page developers demanded. Divi 5’s CSS Grid framework adjustments that, supplying you with layouts that adapt fluidly throughout display screen sizes with out requiring a unmarried line of code. Whether or not you’re development a easy card grid or a posh bento structure, you’ll be able to create responsive designs that paintings fantastically on each instrument, all from the visible editor.
Grid is certainly one of a number of structure programs that make Divi 5 probably the most robust approach to construct WordPress websites. Let’s see precisely what you’ll be able to do with it.
How To Construct A Responsive Grid
The primary a part of that is developing your Grid Format on the base breakpoint (so, for Divi, on Desktop). We’ll use a Loop to create 8 other grid pieces, however you’ll be able to use one thing else, too. In spite of everything, we’ll do so grid:

And listed here are this grid’s pill and cell perspectives (left and proper, respectively).

Step 1. Surroundings Up Your Web page
Get started by way of including a brand new Segment with a unmarried Flex Row.

Configure the Row’s sizing to have those width values:
- Width: 90%
- Max Width: 1300px

This constrains your grid to a focused container. Go away the Column’s sizing at its defaults — after we transfer the row to grid structure, it’ll be managed solely by way of the Row’s Grid settings.
In the end, allow the Loop Builder at the Column to create 8 looped cases. Every looped Column turns into a grid merchandise. Design your loop alternatively works for you, or attempt to emulate the instance we’re running with. For extra main points on configuring Loop Builder queries, see All Divi 5 Loop Builder Question Choices Defined.
With those grid pieces created, we will now customise our Grid settings to make it optimally responsive.
Step 2. Construction The Fundamental Grid Common sense
We’ll create our grid structure at the Row container the usage of Equivalent Width Column and atmosphere the Choice of Columns to 4. For now, the entirety else remains on default settings.
For the sake of this educational, I’ll upload modules and dynamic content material to my column in order that it presentations my submit content material on this loop. The loop and the styling aren’t the purpose of this educational. Every card makes use of Flexbox for its inner structure—if you wish to be told extra about running with Flex in Divi 5, see 5 Pitfalls To Steer clear of When Switching To Divi 5’s Flexbox Format Machine.
Step 3. Set Grid Column Density At Main Breakpoints
On desktop, the grid has 4 columns, however we wish to give each and every grid merchandise a little bit more room on smaller displays. To do this, we will be able to use a easy 4 → 3 → 2 column curve from the bottom instrument down.
To succeed in this, click on the Row that incorporates the looped Column pieces. Then navigate throughout the Design Tab > Format > Grid. Be certain that Column Widths is ready to Equivalent Width Columns. To make this straightforward, open the Responsive Editor for Quantity Of Columns. This permits you to simply set 4 columns on Desktop, 3 on Pill, and 2 on Cellular.
This loosens the grid on smaller displays and makes viewing the content material in each and every grid merchandise more uncomplicated. That is most probably the most important piece to creating your grids responsive and is amazingly simple.
Step 4. Alter Grid Spacing
At this level, we will additionally arrange some wanted hole values and use a Horizontal Hole of 0.75rem and a Vertical Hole of .75rem. In the event you ever really feel {that a} grid is just too tight or free, you’ll be able to set other grid hole values at other breakpoints, as we did with choice of columns.

Gaps take care of spacing between grid pieces all over the entire grid. That is a lot most popular over atmosphere left/proper margin on particular person grid pieces.
Step 5. Create Bento Grid Offsets
A bento grid makes use of numerous merchandise spans to create visible passion. You’ll use nth-pattern regulations to make explicit grid pieces span two columns or two rows. Those regulations repeat each 8 pieces, so the sample scales seamlessly whether or not you may have 8, 16, or 24 grid pieces.
Since we’re running with a selected instance, we all know precisely what we’d like and will depend the grid pieces and notice which of them want the span changes. From the instance screenshot above, I’ve famous that we wish to modify pieces 3, 5, 6, and eight.

Now, pass throughout the Design Tab > Format > Grid > Grid Offset Laws. You are going to upload 4 regulations:
- Customized nth-Kid Rule: 8n+3 | Offset Rule: Row Span | Offset Price: 2
- Customized nth-Kid Rule: 8n+5 | Offset Rule: Column Span | Offset Price: 2
- Customized nth-Kid Rule: 8n+6 | Offset Rule: Row Span | Offset Price: 2
- Customized nth-Kid Rule: 8n+8 | Offset Rule: Column Span | Offset Price: 2
The nth-pattern regulations (like 8n+3) make a choice each eighth merchandise ranging from a selected place, so the bento sample repeats persistently, regardless of what number of grid pieces you upload. So, in the event you simply have 8 grid pieces, 8n+3 will make a choice the third. However when you’ve got 16 grid pieces, then 8n+3 will make a choice the third and eleventh.
Now, you might realize “empty areas” on your grid at other breakpoints. Relying on whether or not you may have default breakpoint values set, you most probably will see an opening on cell. There’s a distinctive grid atmosphere that solves this. Beneath Grid Density, make a choice the second one icon for Auto.
Now, even with customized offset regulations developing an asymmetrical grid, we’re the usage of local CSS Grid tooling that is helping us keep responsive and feature our grid having a look just right it doesn’t matter what.
And in point of fact, this is it. Divi makes it in point of fact simple to create even a slightly complicated grid. Now you’ll be able to transfer directly to the following segment of your site and get that a lot nearer to hitting put up.
Different Divi Options For Mastering Grid Responsiveness
Now that you just’ve constructed a responsive grid the usage of a Row container, listed here are a couple of extra tactics value exploring. Grid isn’t restricted to Rows—you’ll be able to apply it to Sections, Columns, Teams, and modules like Gallery and Portfolio.
Transfer To Guide Mode For Complex Keep watch over
If you know CSS Grid, your talents switch at once to Divi. Transfer to Guide Width Columns and write grid templates like 1fr 1fr 1fr 1fr or repeat(auto-fit, minmax(300px, 1fr)). In the event you don’t know CSS Grid syntax but, no downside—maximum the entirety is achievable throughout the Design tab choices we’ve already coated. Divi’s enhance for Complex Gadgets way you’ll be able to use subtle CSS on every occasion you’re in a position.
Mix Grid And Flexbox
Grid and Flexbox resolve other issues, and Divi 5 means that you can use each in combination. In our bento grid, the Row makes use of Grid to regulate the whole card placement and responsiveness throughout breakpoints.
Every particular person card (constructed at the Column container) makes use of Flexbox to take care of the inner structure—centering textual content, spacing photographs, or aligning buttons.
Grid handles the macro construction. Flexbox handles the micro main points. This mixture offers you in point of fact nice regulate at each degree.
Use Hole As an alternative Of Margin
In Step 4, we set Horizontal and Vertical Gaps to take care of constant spacing all over the grid. Gaps are awesome to margin as a result of they just practice *between* grid pieces—no longer at the outer edges—and so they keep constant regardless of how your grid reflows throughout breakpoints. If you wish to have distinctive spacing for a selected card, you’ll be able to nonetheless practice margin or padding, however get started with gaps as your basis.
Customise Your Breakpoints
Divi 5 lets you outline customized breakpoints, moderately than being locked into usual desktop/pill/cell widths. Alter your grid columns, gaps, and offsets on the actual viewport widths the place your design wishes to switch. See Customizable Responsive Breakpoints for main points.
Construct Responsive Internet sites In Divi 5 These days
You simply constructed a responsive bento grid in mins—no customized CSS, no media question debugging, simply visible controls that paintings. This identical workflow applies persistently throughout quite a lot of platforms, together with portfolio grids, product showcases, weblog layouts, and touchdown web page sections. As soon as you recognize Grid, you’ll be able to design whole websites sooner than you ever may prior to.
Many WordPress websites are already working on Divi 5. In the event you haven’t made the transfer but, there’s by no means been a greater time. Obtain it now and notice how a lot sooner you’ll be able to construct.
The submit How To Grasp Grid Responsiveness In Divi 5 seemed first on Chic Issues Weblog.
WordPress Web Design