How To Create A Responsive Image Mosaic With Divi 5’s CSS Grid Editor

by | Oct 18, 2026 | Etcetera | 0 comments

A picture mosaic combines images of various sizes in a single hooked up grid. Higher tiles spotlight decided on photographs, whilst smaller tiles fill the areas round them.

With Divi 5’s CSS Grid Editor, you’ll be able to construct this association visually, resizing and positioning tiles without delay at the grid canvas.

On this instructional, we’ll construct a twelve-image mosaic throughout 4 columns, create 4 better characteristic tiles, and coordinate the picture styling with a preset. Then we’ll adapt the structure for pill and speak to.

Why Symbol Mosaics Want Responsive Changes

A mosaic will get its form from spans. A tile can stretch throughout two columns, two rows, or each, developing an association of bigger and smaller photographs.

The ones spans want consideration when the display screen narrows. A tile spanning two columns can’t have compatibility inside a single-column grid with out an adjustment. An inherited beginning place too can position an merchandise out of doors the supposed columns. Those settings can create further grid tracks, gaps, or horizontal overflow.

The purpose is to check the position regulations at each and every breakpoint, retaining the spans that also have compatibility and adjusting the ones that don’t.

The place The Grid Editor Comes In At hand

The CSS Grid Editor presentations the grid’s tracks, gaps, and merchandise placement in combination. Drag a nook to resize a tile or transfer an merchandise to any other place. Divi information those adjustments as Grid Offset Laws at the container, which is the Row on this instance.

Use the instrument icons on the height of the builder to modify between Desktop, Pill, and Telephone. At each and every breakpoint, evaluation the inherited structure and upload the column, hole, and site changes it wishes.

What The Mosaic Seems Like At Every Measurement

Listed here are the 3 layouts earlier than we construct them. Desktop makes use of 4 columns, with better characteristic tiles alternating between the left and appropriate.

Pill makes use of two columns. The characteristic tiles span the entire grid width, whilst the smaller photographs take a seat in pairs between them. Telephone makes use of a unmarried column, giving each and every picture its personal position in a vertical series.

Responsive image mosaic shown on desktop, tablet, and phone

Step 1: Upload The Row And Open The Grid Editor

Upload a brand new Row for your Segment and provides it 12 Columns, as proven underneath. Every kid Column will dangle one picture.

See also  31 Easiest WordPress Topics for Blogs in 2022

Those twelve content material Columns are break free the grid’s monitor rely. We’ll organize them throughout 4 grid tracks on desktop.

Open the Row settings, cross to the Content material tab, and click on Open Grid Editor. If the button isn’t to be had, set the Row’s Structure Taste to Grid beneath Design > Structure first.

The editor opens as a floating panel that you’ll be able to reposition when you paintings.

Opening the Grid Editor from the Row settings

Set Columns to 4 and go away Rows on auto so the grid can create rows as wanted. Set each Horz. Hole and Vert. Hole to 40px.

Use 12 within the Grid Pieces box to preview the twelve kid Columns. This box controls the editor’s preview pieces; it does now not upload content material Columns to the Row.

Setting four grid columns and 40px horizontal and vertical gaps

Activate Display Grid Traces and Display Observe IDs the usage of the controls at the appropriate. Those visible guides show you how to apply the tracks and take a look at the place each and every tile sits.

Grid lines and track identifiers enabled in the Grid Editor

The canvas now presentations 4 equivalent tracks, each and every sized at 1fr, with twelve numbered pieces. Subsequent, we’ll flip 4 of the ones pieces into better tiles.

Step 2: Form The Function Tiles On The Canvas

Get started with merchandise 1. Snatch its bottom-right nook maintain and resize it to hide two columns and two rows. It must occupy the top-left block of the grid.

As the thing expands, the encircling pieces reflow in line with their placement regulations. A chip categorized Rule 1 seems to spot the brand new rule.

Subsequent, resize merchandise 4 to hide two columns and two rows at the appropriate. Place it around the ultimate two columns in rows two and 3.

This provides the primary two characteristic tiles a staggered association, with smaller photographs filling the areas beside them.

Proceed with pieces 7 and 10, giving each and every a two-column, two-row span. Position merchandise 7 at the left underneath the primary workforce, then merchandise 10 at the appropriate, offset one row decrease.

Observe the association underneath, leaving house for the smaller tiles and checking that not one of the characteristic tiles overlap.

Four larger image tiles arranged in an alternating grid pattern

You presently have 4 better tiles alternating between the left and appropriate, with 8 smaller tiles organized round them. Take a look at the numbered preview pieces towards the instance earlier than including the photographs.

The location regulations belong to the Row. The Symbol Modules we’ll upload subsequent give you the content material within each and every tile.

Step 3: Upload The Photographs And Taste Them As soon as

Upload an Symbol Module to each and every of the twelve kid Columns and choose {a photograph} for each and every one. Merchandise 1 provides the primary characteristic picture, pieces 2 and three fill the smaller tiles beside it, and the remainder photographs apply the numbered association.

Photographs with other proportions would possibly not to start with line up as supposed. We’ll coordinate their sizing, corners, and framing on one Symbol Module, then reuse the ones settings around the mosaic.

Open the primary Symbol Module and cross to Design > Sizing. Allow Power Fullwidth so the picture fills the to be had width.

See also  Divi 5 Sizing System & Color Palette Variable Generator

Leaving Top on auto avoids a set pixel top, nevertheless it does now not mechanically make the picture fill its grid house vertically. Use Side Ratio when you wish to have a constant picture form.

Enabling Force Fullwidth in the Image Module sizing settings

For the sq. tiles used on this mosaic, set the Side Ratio fields to 1 for Width and 1 for Top. This establishes a sq. body that scales with the picture’s width.

Subsequent, open Border and set all 4 rounded corners to 20px. This provides the bigger and smaller tiles a constant end.

Setting 20px rounded corners on the Image Module

Open Framing and set Object Are compatible to Quilt. This fills the picture’s body whilst maintaining the {photograph}’s proportions, cropping the portions that reach past its edges.

Use Object Place to regulate which a part of the {photograph} stays visual. This turns out to be useful when a face, product, or different matter sits clear of the middle.

Using Object Fit and Object Position to control image cropping

The settings have other jobs: Side Ratio establishes the body’s proportions, whilst Quilt controls how the {photograph} fills it. Quilt by myself does now not create a sq. body or set the grid’s row heights.

To reuse the styling, open the preset dropdown on the height of the Symbol Module settings and create an Part Preset named Mosaic Symbol from the present design settings.

Proper-click the module and make a choice Lengthen Attributes. Choose the preset project and prolong it to the opposite Symbol Modules inside this Row, as proven underneath. Stay the extension restricted to the preset so each and every module keeps its personal {photograph}.

You’ll now replace the shared styling thru Mosaic Symbol. For instance, converting the preset’s nook radius updates the photographs the usage of that price, until a person module overrides it.

Assessment the vegetation after making use of the preset. Stay photo-specific Object Place changes at the particular person modules so you’ll be able to place each and every matter independently.

In any case, take a look at the tile edges. With equal-width grid tracks, sq. picture frames, and matching horizontal and vertical gaps, the bigger two-by-two tiles can align with the smaller tiles round them. If an edge is out of line, take a look at for conflicting picture heights, margins, or Column padding.

Completed four-column image mosaic on desktop

Step 4: Modify The Mosaic For Pill

Transfer to Pill view the usage of the instrument icons on the height of the builder. Make the next changes at this breakpoint so the desktop structure remains intact.

Switching to Tablet view in the Visual Builder

Within the Grid Editor, set Columns to 2. The bigger photographs must span each columns, whilst the smaller photographs take a seat in pairs.

Take a look at the inherited placement regulations in addition to the spans. A characteristic tile situated in desktop columns 3 and 4 wishes a brand new place throughout the two-column pill grid.

The use of two columns offers the pictures more space at this width. The structure keeps a mixture of better and smaller photographs with out squeezing 4 tiles around the display screen.

Cut back each Horz. Hole and Vert. Hole to 20px.

See also  Get a Loose Jewellery Artist Format Pack for Divi

Reducing the tablet grid gaps to 20px

Assessment the canvas for empty areas, overlaps, or pieces out of doors the 2 supposed columns. If a desktop placement leaves an opening, regulate that merchandise’s place or span for Pill.

Stay the numbered picture series in thoughts whilst repositioning tiles. The purpose is to put the bigger photographs between pairs of smaller photographs, as proven underneath.

Two-column tablet mosaic with full-width feature images

Step 5: Modify The Mosaic For Cell

Transfer to Telephone view. We’ll simplify the mosaic right into a single-column picture series at this breakpoint.

Switching to Phone view to adjust the image mosaic

Set Columns to 1. Then resize each and every characteristic tile so its Column Span is 1. You’ll drag its nook inward at the canvas or edit its rule without delay.

Additionally evaluation any inherited Column Get started, Column Finish, and row placement values. Stay each and every merchandise throughout the first column, use a single-row span for each and every tile, and take away or override placements that save you the photographs from stacking in series.

Merely decreasing the column rely isn’t sufficient if the remainder regulations nonetheless position an merchandise past that column. Checking each spans and positions avoids undesirable tracks and gaps.

Every picture must now occupy the to be had grid width in its personal row. The interlocking desktop association turns into a more effective vertical gallery, whilst the picture order stays constant.

Single-column image gallery on phone

Preview the web page at desktop, pill, and speak to widths earlier than saving. Take a look at for horizontal overflow, accidental gaps, and images whose topics were cropped out.

Modify a person picture’s Object Place the place wanted. Additionally resize the preview between the principle breakpoint widths to verify the structure stays balanced because the to be had house adjustments.

Reuse The Mosaic With Other Photographs

The Row holds the grid construction and site regulations, whilst the Symbol Modules dangle the pictures. You’ll exchange the photographs with out rebuilding the association, then regulate their vegetation to fit the brand new topics.

The characteristic regulations goal merchandise positions. In the event you reorder the kid Columns, the photographs occupying positions one, 4, seven, and ten obtain the ones characteristic placements.

The Mosaic Symbol preset helps to keep the shared picture styling manageable, whilst the breakpoint changes let the similar assortment paintings as a four-column mosaic, a two-column structure, and a single-column gallery.

As soon as the construction is in position, you’ve a reusable place to begin in Divi 5 for product images, a piece of writing picture assortment, or a visible portfolio.

The publish How To Create A Responsive Image Mosaic With Divi 5’s CSS Grid Editor gave the impression 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!