CSS Grid is a game-changer for web design. It lets you create complex, professional layouts that would take hours with traditional methods. Bricks Builder makes Grid accessible to everyone, not just developers.
If you're coming from Elementor or other page builders, you'll love how Grid gives you precise control without bloated markup. Your sites load faster, look better, and adapt perfectly to any screen size.
What Is Bricks Builder?
Bricks Builder is a visual WordPress page builder focused on performance and clean code. Unlike Elementor's div-heavy approach, Bricks generates semantic HTML that search engines love.
The Grid container in Bricks uses native CSS Grid properties. This means professional layouts without performance penalties.
Setting Up Your First CSS Grid
Let's build a typical business website layout. We'll create a header, main content area, sidebar, and footer that adapts beautifully to different screen sizes.
Step 1: Add the Grid Container
- Click the + icon in Bricks Builder
- Search for "Container" and select it
- In the element settings, go to Layout
- Set Display to Grid
You'll see new options appear. This is where the magic happens.
Step 2: Define Your Grid Structure
In the Grid Template Columns field, enter: 1fr 300px
This creates two columns:
- Left column takes available space (
1fr) - Right column is fixed at 300px (perfect for a sidebar)
For Grid Template Rows, enter: auto 1fr auto
This creates three rows:
- Header: fits content height (
auto) - Main: takes remaining space (
1fr) - Footer: fits content height (
auto)
Step 3: Create Your Grid Areas
Grid areas let you name sections of your layout. Add this to Grid Template Areas:
"header header"
"main sidebar"
"footer footer"
Each line represents a row. Each word represents a column position.
Pro Tip: Use the same name across multiple cells to make an element span across them. Notice how "header" and "footer" span both columns.
Adding Content to Your Grid
Now we'll add elements and assign them to specific grid areas.
Adding the Header
- Add a new Section inside your Grid container
- In Layout → Grid, set Grid Area to
header - Add your logo, navigation menu, or any header content
The section automatically positions itself in the header area.
Adding Main Content
- Add another Section
- Set Grid Area to
main - Add your content blocks, text, images, etc.
Adding the Sidebar
- Add a third Section
- Set Grid Area to
sidebar - Add widgets, forms, or supplementary content
Adding the Footer
- Add a final Section
- Set Grid Area to
footer - Add copyright, links, contact details
Making It Responsive
Grid shines on mobile devices. Let's adapt our layout for smaller screens.
Mobile-First Approach
- Select your Grid container
- Switch to the Tablet breakpoint (tablet icon in toolbar)
- Change Grid Template Columns to
1fr(single column) - Update Grid Template Areas to:
"header"
"main"
"sidebar"
"footer"
Now your sidebar moves below the main content on tablets and phones.
Keyboard Shortcut: Use D to quickly duplicate elements, Cmd/Ctrl + Z to undo changes.
Advanced Grid Techniques
Creating a Photo Gallery Grid
Perfect for portfolios or property listings:
- Create a new Grid container
- Set Grid Template Columns to
repeat(auto-fit, minmax(250px, 1fr)) - Add Basic Elements → Image for each photo
- Set Gap to
20pxfor even spacing
This creates a responsive gallery that automatically adjusts the number of columns based on screen width.
Building a Services Section
Great for professional service websites:
- Grid Template Columns:
repeat(3, 1fr) - Add three Div elements
- Style each with icons, headings, and descriptions
- On mobile, change to
1frfor single-column stacking
Complex Magazine Layouts
For blogs or news sites:
- Create a 4×3 grid:
repeat(4, 1fr)columns,repeat(3, 200px)rows - Make the featured article span multiple cells:
- Grid Column:
1 / 3(spans first two columns) - Grid Row:
1 / 3(spans first two rows)
- Grid Column:
- Fill remaining cells with smaller articles
Grid vs Flexbox in Bricks
Many builders only offer Flexbox. Here's when to use each:
Use Grid for:
- Two-dimensional layouts (rows AND columns)
- Complex positioning requirements
- Creating responsive layouts without media queries
Use Flexbox for:
- One-dimensional layouts (either rows OR columns)
- Aligning items within containers
- Simple navigation menus
Bricks gives you both. Most professional layouts benefit from Grid containers with Flexbox elements inside them.
Performance Benefits
CSS Grid generates cleaner HTML than traditional page builders. Instead of nested div soup, you get semantic structure that loads faster.
This matters for your website's performance and search engine rankings. Clean code means better Core Web Vitals scores.
Common Grid Mistakes to Avoid
Overcomplicating Simple Layouts
Don't use Grid for everything. A simple two-column layout might work better with Flexbox.
Forgetting Mobile Users
Always test your Grid layouts on phones. Complex desktop grids often need complete restructuring on mobile.
Ignoring Content Flow
Grid lets you position elements anywhere. But screen readers and search engines still read content in HTML order. Keep accessibility in mind.
Not Using Semantic Elements
Use proper HTML elements inside your Grid:
<header>for page headers<main>for primary content<aside>for sidebars<footer>for page footers
Bricks generates these automatically when you choose the right elements.
Pro Tips for Faster Grid Development
Use the Visual Grid Overlay
Enable Grid Overlay in Bricks settings to see your grid lines while designing. This makes positioning much easier.
Name Your Grid Lines
Instead of numbers, name your grid lines:
grid-template-columns: [sidebar-start] 300px [content-start] 1fr [content-end];
Then reference them by name: grid-column: sidebar-start / content-start
Create Reusable Grid Templates
Save common grid layouts as Bricks templates. Build your grid structure once, then duplicate it for new projects.
Use CSS Custom Properties
Define your grid gaps and sizes as CSS variables:
--grid-gap: 2rem;
--sidebar-width: 300px;
Change them globally from one place.
Troubleshooting Grid Issues
Elements Not Appearing
Check that your Grid Template Areas syntax is correct. Each row should have the same number of area names.
Overlapping Content
Ensure each grid area has unique names, or intentionally overlap them for creative layouts.
Mobile Layout Breaking
Always define mobile-specific grid properties. Don't rely on the desktop layout to work on phones.
Beyond Basic Grids
Once you master the basics, explore advanced features:
- Subgrid for nested layouts (limited browser support)
- Dense packing for Pinterest-style layouts
- Masonry layouts with
grid-template-rows: masonry
CSS Grid in Bricks Builder opens up design possibilities that were previously impossible or required custom code. The performance benefits alone make it worth learning.
Start with simple layouts and gradually add complexity. Your websites will look more professional and load faster than ever before.
Want to see these techniques in action? Get in touch and we'll show you how Grid can transform your website's design and performance.