GridVids
Sign in with YouTube

WordPress Grid Layout: Build Bento Grids With CSS Grid

Mark watched
Don't Miss
Hide
Open in popup Open on YouTube

WPCrafter.com WordPress For Non-Techies 2 years ago
Chapters

Bento box layouts look great but are hard to build. One idea makes any WordPress grid layout easy. Build a five-box CSS grid step by step in Spectra, then place one box exactly where you want it.

CSS grid, also called a bento box layout, breaks away from plain rows and columns. Each box can take its own width and height and sit in its own spot. We start with a few examples, from simple to complex.

The breakthrough is that a grid has two parts. The structure is how many columns and rows you set. The map is the numbered lines around them, one more than your columns and rows, and it tells you where any box starts and ends.

We screenshot the layout we want to recreate, count its columns and rows, then build it in the block editor: a container set to the grid layout, four columns, two rows, five child containers and a gap between them.

The simple grid item settings make a box span two columns. Then the advanced settings use the map to move the fifth box to the top right and make it two rows tall.

Last, check the tablet and mobile settings so the grid still looks right on small screens, especially after custom positioning.

The video uses a pre-release version of Spectra, which was adding CSS grid at the time, but the structure and map idea works in any builder that offers CSS grid. Want to follow along? The link below recreates the demo site with every grid from the video, no login needed.

Recreate the demo site and test it yourself https://app.zipwp.com/blueprint/learn-css-grid-yzb

Spectra https://www.wpcrafter.com/spectra

MY PRODUCTS SureCart (ecommerce for WordPress) https://www.wpcrafter.com/surecart SureMembers (memberships) https://www.wpcrafter.com/suremembers SureDash (communities and courses) https://suredash.com/ OttoKit (automation) https://www.wpcrafter.com/suretriggers Presto Player (video) https://www.wpcrafter.com/prestoplayer ZipWP (AI website builder) https://www.wpcrafter.com/zip

RECOMMENDED HOSTING ZipWP Managed Hosting https://zipwp.com/managed-hosting/ Hostinger https://www.wpcrafter.com/hostinger Cloudways https://www.wpcrafter.com/cloudways

CHAPTERS

What layout would you build first with CSS grid? Subscribe for more WordPress tutorials. All of the opinions expressed in this video are my own, I was not paid to make this video. Whenever there is a link in any of my videos, if there is a referral program available, please assume that you are clicking on a referral link.