Skip to main content
Agency Program 50% cashback. Exclusive discounts. Priority support. Built for growing agencies. 50% cashback. Exclusive discounts. Priority support. Built for growing agencies. Speak to the team Join free

How to Remove (or Add) Space Between WordPress Blocks

The Spacer block adds space between WordPress blocks; margin, padding and block gap remove it. Fix one page in the editor, or the whole site with theme.json.

NS
Neha Sharma
Content, InstaWP
Updated Nov 6, 2026 26 min read

Trying to add or remove blank space between WordPress blocks? In most cases the fix lives inside the Gutenberg block settings: open the block’s Dimensions panel, adjust its margin or padding, set the block gap, delete any stray Spacer blocks, and preview on mobile before you publish.

When the gap comes from the theme itself, a small amount of CSS or a theme.json change fixes it site-wide. And when the page is a live or client site, make the change on a staging copy first, then push the approved layout back to production; on InstaWP, the AI-native WordPress cloud with managed hosting, that copy is built in from the Pro plan, or a $2 sandbox does the same job.

This guide covers every reliable way to control WordPress spacing between blocks, paragraphs, columns, images, buttons, and full sections.

Quick answer

The Spacer block is the WordPress block that adds blank space between other blocks. To remove unwanted space, work through five layers in order: Spacer blocks, then block margin, then block padding, then the parent block gap, then theme CSS / theme.json. For live sites, fix it on a staging copy first, then sync to production.

Still seeing a gap after you delete the Spacer? It almost always comes from the parent block’s gap or from the theme, not from the block you are looking at. Find the source of the gap before you change anything else.

Key takeaways
  • The Spacer block adds space; margin, padding and block gap remove it. Margin is the space outside a block, padding is the space inside it.
  • Remove space in this order: stray Spacer blocks, block margin, block padding, the parent block’s gap, then theme CSS or theme.json. Most gaps are solved by the third step.
  • Set the lower block’s top margin, not the upper block’s bottom margin. On Twenty Twenty-Five the 19.2 px gap between blocks is the lower block’s top margin; setting the upper block’s bottom margin to 0 changed nothing in our test.
  • Gap between paragraphs? Press Shift + Enter for a line break inside one paragraph instead of Enter, which starts a new block with its own spacing.
  • Use a Spacer only for one-off gaps. For repeated spacing, set it once in theme.json so every page stays consistent.
  • Fix live sites on a copy. Test the change on a WordPress staging site, or connect an existing site with InstaWP Connect and push the approved layout back with 2-way sync.
  • Save a clean spacing setup as one of your Snapshots or Templates and start the next build from it.

Why WordPress Spacing Issues Happen

WordPress spacing issues happen because several layers control the same visual gap at once. The block editor applies its own margin and padding, the active theme adds spacing through CSS and theme.json, and individual blocks such as Group, Columns, Cover, Paragraph, Image, and Buttons each inherit their own rules.

When two of these layers disagree, you get a layout that looks perfect inside Gutenberg but appears “off” on the published page.

If you work with WordPress professionally, especially as an agency handling multiple clients, you already know that controlling block spacing is more complex than it should be. The good news is that almost every spacing problem traces back to one of four sources, and once you can name the source, the fix is quick.

Paragraph gaps
Usually caused by paragraph margins, default theme rhythm, or Enter vs Shift + Enter.
Block gaps
Usually caused by block gap, block margin, padding, or stray Spacer blocks.
Column gaps
Usually caused by the Columns block gap, inner column padding, or parent Group spacing.
Theme spacing
Usually caused by global CSS, theme.json settings, or page builder styles.

How to Diagnose the Source of the Gap First

Before you change a single value, find out where the space is coming from. Editing blindly is exactly how a “small spacing tweak” turns into a broken layout. Spend 60 seconds diagnosing first:

  1. Click the block above the gap, open the sidebar, and expand Dimensions. Note its bottom margin and bottom padding.
Paragraph block selected in the WordPress 7.1 editor, with the Dimensions panel showing a 24px bottom padding and a 0px bottom margin
The block above the gap: 24px of bottom padding adds space here, while its bottom margin is already 0.
  1. Click the block below the gap and note its top margin and top padding. In block themes this is usually where the gap lives: the theme’s block spacing is applied as the top margin of the lower block.
Paragraph below the gap selected in the WordPress 7.1 editor, with the Dimensions panel showing a 48px top margin
The block below the gap carries a 48px top margin, set in its Dimensions panel.
  1. Open List View (top-left icon) and look for an empty Paragraph block or a Spacer block sitting between the two.
List View in the WordPress 7.1 editor with an empty Paragraph block and a Spacer block selected between two paragraphs
List View exposes an empty Paragraph and a Spacer between the two blocks. Delete them and the gap closes.
  1. If both blocks live inside a Group or Columns block, check that parent’s block gap.
Group block selected in the WordPress 7.1 editor, with Block spacing set to 40px in the Dimensions panel
This Group’s Block spacing of 40px sets the gap between every block inside it.
  1. If the editor shows no spacing but the live page does, the source is theme CSS or theme.json. Use your browser’s Inspect tool to see which rule applies.
Chrome DevTools inspecting a paragraph on the live page, showing the theme rule margin-block-start: 1.2rem from the global styles
Inspect on the live page: the 1.2rem top margin comes from the theme’s global styles rule, not from the block.

Once you know the source, jump to the matching method below. If the page is on a production or client site, start with Method 1 so you never test on the live site.

How Much Space Does WordPress Add Between Blocks? (Measured)

On a default WordPress 7.1 block theme, consecutive blocks are 19.2 pixels apart. That gap is Twenty Twenty-Five’s block spacing of 1.2rem, and WordPress applies it as the top margin of the lower block, so setting the upper block’s bottom margin to 0 does nothing. InstaWP measured every common case on 5 November 2026 on a fresh site (WordPress 7.1.4, Twenty Twenty-Five 1.5, no plugins) by reading the rendered page in a browser at desktop (1280 px) and mobile (390 px) widths.

What sits between the blocksDesktop (1280 px)Mobile (390 px)Where the space comes from
Nothing (two Paragraph blocks)19.2 px19.2 pxTheme block spacing, styles.spacing.blockGap: 1.2rem
Heading, then a paragraph19.2 px19.2 pxThe same block spacing
An empty Paragraph block19.2 px (adds nothing)19.2 px (adds nothing)Its margins collapse on the published page, though it still shows as a blank line in the editor
A default Spacer block (100 px)138.4 px138.4 pxThe Spacer’s 100 px plus block spacing above it and below it
Upper block margin-bottom set to 019.2 px (no change)19.2 px (no change)The gap belongs to the lower block
Lower block margin-top set to 00 px0 pxRemoves the theme gap for that pair
Group with Block spacing set to 00 px between children0 px between childrenThe Group overrides the theme value for its own children
Lower block margin-top set to the Large preset70 px30 pxPreset clamp(30px, 7vw, 70px) shrinks on small screens
Columns block (two columns)50 px apart side by side30 px apart when stackedColumns block spacing, clamp(30px, 5vw, 50px)
Buttons block (two buttons)16 px16 pxButtons block spacing, 16px
Where the 19.2 px gap between two paragraphs comes from (Twenty Twenty-Five)
Paragraph Amargin-bottom: 0 (setting it to 0 changes nothing)
19.2 px gap = block spacing 1.2rem
Paragraph Bmargin-top: 1.2rem, added by the theme’s block spacing. Set this to 0 to close the gap.
Measured on WordPress 7.1.4 with Twenty Twenty-Five 1.5, 5 November 2026, at 1280 px and 390 px wide.

Two results answer the most common complaint, “I set it to 0 and the gap is still there.” First, set the top margin of the block below the gap, not the bottom margin of the block above it. Second, block spacing still applies on both sides of a Spacer: a 100 px Spacer produced a 138.4 px gap, so delete the Spacer or set its neighbours’ margins instead of shrinking it.

Group block selected in the WordPress 7.1 editor with Padding, Margin and Block spacing controls in the Dimensions panel
WordPress 7.1 lists Padding, Margin and Block spacing together in the Dimensions panel. Here a Group with Block spacing 0 keeps its two paragraphs flush.

Not on Twenty Twenty-Five? Other block themes use the same mechanism with their own numbers. Open your theme’s theme.json and read styles.spacing.blockGap for the default gap, and settings.spacing.spacingSizes for the presets the editor offers. Classic themes usually set paragraph and heading margins in their stylesheet instead, which is where Method 4’s CSS comes in.

Best Methods to Fix Space Between WordPress Blocks

The fastest way to remove space between two WordPress blocks is to select the lower block and set its top margin to 0, or to set the parent Group’s Block spacing to 0. To add space, raise that same margin or insert one Spacer block. If the gap appears on every page, change it once in theme.json or theme CSS. Below are the most effective ways to add or remove space between WordPress blocks safely, whether you are editing a simple blog post, a landing page, or a live client website.

Method 1: Fix WordPress Block Spacing Using AI + Staging (Safest for Live Sites)

If the spacing problem is on a live site, the worst place to fix it is the live site. A wrong margin value, a deleted Spacer, or an over-aggressive CSS rule can shift an entire section, and on a WooCommerce or lead-generation page that can cost real conversions while you debug in public.

The safe, repeatable method is to create a staging copy, fix the spacing there (on your own or with an AI agent that can read and edit the layout for you), test the result on desktop and mobile, and then sync only the approved change back to production.

This is where InstaWP, as a full WordPress cloud platform, does more than a plain Gutenberg tutorial can, because staging, the AI connection, and the one-click push to your live site all live in one place.

Spin up a WordPress sandbox and test spacing changes before they reach your live site.

Create a Staging Site →

Step-by-Step: The Safe Spacing Workflow on InstaWP

Install the free InstaWP Connect plugin on your existing WordPress site and link it to your InstaWP dashboard. If your site is already hosted on InstaWP, skip this step.

Must Read: InstaWP Connect Plugin

From the dashboard, create a staging site of the live site. You now have an identical, disposable environment that nobody else can see.

InstaWP Connect plugin screen in wp-admin with the option to create a staging site of the live site

Watch the Video Tutorial.

Enable 2-Way Sync so InstaWP records exactly which changes you make on staging and lets you push them back later in either direction.

Open the site’s MCP panel and toggle Enable MCP to ON. InstaWP installs the MCP plugin, generates a secure token, and gives you a connection URL you paste into your AI client.

InstaWP site MCP panel with Enable MCP switched on and the connection URL ready to copy

Either adjust the block settings yourself (Methods 2 to 5 below) or ask the AI agent to find the source of the gap and propose the smallest possible fix. Always review the change before applying it.

Test on every breakpoint. Preview the page on desktop, tablet, and mobile. Spacing bugs love to hide on small screens.

Push approved changes live. Once the layout looks right, sync the change from staging back to production with one click. Your live site only ever receives the finished result.

How the AI part actually works. Every InstaWP site is MCP-ready with a single toggle, no server setup, no JSON config, no Application Password. With InstaMCP you can connect AI clients such as Claude Desktop, Claude Code, Cursor and ChatGPT directly to the staging site. The agent reads your page structure, tells you whether a gap comes from a Spacer, a margin, a column gap, or theme CSS, and can apply the fix for you, all inside the safe staging environment.

Example Prompts for AI-Assisted Spacing Fixes

Once your AI client is connected to the staging site, these prompts work well. Notice that each one asks the agent to diagnose before editing and to prefer the cleanest fix.

Find the source of the extra blank space between the hero section and the next Group block on the homepage. Check for Spacer blocks, block margins, padding, and block gap before changing anything, and tell me which one is responsible.
Remove the extra space between these two paragraph blocks without affecting the rest of the page. Use Gutenberg block settings first, and only fall back to CSS if the gap is coming from the theme.
The columns on the pricing section have a large gap on mobile but look fine on desktop. Check the Columns block gap, each inner column's padding, and the parent Group spacing, then fix only the mobile gap.

If you are building a new site rather than fixing an old one, InstaWP Studio, a chat-based WordPress site builder now in Beta, lets you ask for a spacing change in plain words. Type “reduce the space between sections” for one page or the whole site, or click the gap, leave a note and press Apply. Every change can be undone in one click.

Why Use a Staging Site Before Fixing WordPress Spacing?

Staging is not just a “nice to have” for spacing work. It is what separates a calm, reversible edit from a public mistake. A staging-first workflow gives you:

  • No risk to the live layout. Visitors and customers never see a half-finished fix.
  • Safer for client sites. You can show the client the corrected staging page before anything goes live.
  • Easy rollback. If a fix looks wrong, you discard the staging copy instead of scrambling to undo production changes.
  • Safe space for AI edits. Giving an AI agent write access is far less risky when it is pointed at a disposable staging site rather than your live store.
  • Real testing before deployment. You confirm desktop, tablet, and mobile all look right, then push once.
Did you know? Because InstaWP is a managed WordPress hosting platform as well as a sandbox tool, the same staging site you use to fix spacing can be cloned, saved as a reusable template, or pushed to production hosting in one click. The fix is the start of a real workflow, not a throwaway.
Try the spacing fix on a copy firstSpin up an InstaWP sandbox ($2 a month), fix the gap there, and only touch the live site once the layout looks right on desktop and mobile.
Create a sandbox →

Method 2: Adjust Margin, Padding, and Block Gap in Gutenberg

The cleanest no-code way to add or remove space between WordPress blocks is to use Gutenberg’s built-in spacing controls. They live in the Dimensions panel of the block sidebar. In WordPress 7.1, Paragraph and Group blocks show Dimensions directly in the Block tab, while blocks with separate Settings and Styles tabs, such as Columns, keep it under Styles. The exact controls depend on your theme, with block themes exposing the most options.

How to Remove Space Between Two WordPress Blocks

Open the page or post in the WordPress Block Editor. Select the block above the unwanted gap. In the sidebar, scroll to Dimensions (open the Styles tab first if the block has one).

Block editor Styles tab with the Dimensions panel for adjusting a block's margin and padding

Reduce its margin bottom and padding bottom (set to 0 if the block should sit flush). Select the block below the gap and reduce its margin top and padding top. On a block theme the lower block’s top margin is the one that matters: in our test, setting the upper block’s bottom margin to 0 left the full 19.2 px gap, while setting the lower block’s top margin to 0 closed it. Prefer responsive units such as rem over fixed pixels so the spacing holds up on mobile.

Margin vs Padding vs Block Gap

Knowing which of the three controls to reach for is the whole game. Here is the quick reference (for a longer explanation, see padding vs margin in WordPress):

Setting What it controls Use it when
Margin Space outside the block You want to add or remove the gap between two separate blocks
Padding Space inside the block You want more or less breathing room inside a Group, Cover, Column, or Button
Block gap Space between child blocks inside a parent You are editing a Group, Row, Stack, or Columns layout

How to Remove Space Between Paragraphs in WordPress

Extra space between paragraphs is one of the most searched WordPress spacing problems, and it usually has one of three causes. Work through them in order:

  1. Separate paragraph blocks. Pressing Enter creates a new Paragraph block with its own margin. If you only want a line break inside the same paragraph, press Shift + Enter instead.
  2. Block spacing on the paragraph. Select the paragraph, open Dimensions, and reduce the margin if your theme exposes the control.
  3. Theme paragraph margin. If the gap persists, the theme is applying margin to the paragraph tag. Adjust it with targeted CSS.
.entry-content p {
  margin-bottom: 1rem;
}

Reduce the value gradually and only after testing. Stripping all paragraph margins site-wide makes long-form content harder to read, so aim for tighter, not zero.

On block themes such as Twenty Twenty-Five, the space between paragraphs is the theme’s block spacing (1.2rem, or 19.2 px), set as each paragraph’s top margin, so a margin-bottom rule like the one above will not shrink it. Target margin-block-start on the paragraph instead, or lower styles.spacing.blockGap in theme.json. An empty Paragraph block, by contrast, added no space at all on our published test page, even though it shows as a blank line in the editor.

How to Fix Space Between Columns in WordPress

Column spacing trips people up because there are two different blocks involved: the parent Columns block and each child Column block. Select the parent Columns block first, not just one column, then work outward:

  • To reduce horizontal space between columns: select the Columns block and lower the block gap. In WordPress 7.1 the Columns block has two Block spacing controls under Styles > Dimensions: one for the space between columns and one for the space when they stack. Twenty Twenty-Five sets them to clamp(30px, 5vw, 50px), which measured 50 px on desktop and 30 px once the columns stacked on a phone.
Columns block in the WordPress 7.1 editor with separate horizontal and vertical Block spacing controls in the Dimensions panel
Columns block in WordPress 7.1: the two Block spacing controls under Dimensions set the horizontal gap and the gap when columns stack.
Columns block settings with the block spacing control for the gap between columns
  • To fix vertical gaps that only appear on mobile: columns stack on small screens, so check each Column’s top and bottom padding.
  • To fix section-level gaps: if the columns sit inside a Group or Container, inspect that parent’s margin and padding.

Method 3: Use the Spacer Block to Add Blank Space

The Spacer block is the dedicated WordPress block for adding blank space between other blocks. It is the most beginner-friendly option and is genuinely useful for quick layout adjustments, prototypes, and simple one-off gaps where margin and padding would be overkill.

How to Add a Spacer Block

Click the + icon between the two blocks where you want space. Search for Spacer and insert it.

Inserting a Spacer block from the block inserter in the WordPress editor

Drag the handle to resize, or set an exact height in the Dimensions panel. Switch the unit to rem or em where possible so the gap scales responsively. Remember that block spacing still applies around a Spacer: on Twenty Twenty-Five a default 100 px Spacer produced a 138.4 px gap, so size it about 38 px smaller than the gap you want.

Resizing a Spacer block's height in the WordPress block editor

Preview on mobile before publishing.

Warning: do not stack Spacer blocks. If you find yourself adding three Spacer blocks to make a layout look right, the real issue is margin, padding, block gap, or theme CSS. Stacked spacers bloat the DOM, slow the page, and create messy block structures that are hard to debug later. Fixed pixel spacers are the most common cause of oversized blank gaps on mobile.

If you build the same kind of layout repeatedly, set the spacing once in an InstaWP sandbox, save the build as a Snapshot or Template, and reuse it across future projects instead of rebuilding spacing by hand on every site.

Method 4: Use Custom CSS or Custom HTML for Precise Fixes

Reach for custom CSS when Gutenberg’s controls are not enough, or when a theme applies stubborn default spacing you cannot override from the sidebar. CSS is also the right tool for reusable spacing rules you want to apply across many pages, patterns, or templates at once.

Remove Extra Space Below a Specific Block

Select the block, open Advanced > Additional CSS class(es), add a class such as no-bottom-gap, then add this rule to your theme’s Additional CSS or stylesheet:

Adding a custom CSS class under Advanced settings to remove the space below a block
.no-bottom-gap {
  margin-bottom: 0 !important;
}

Set Consistent Spacing After Headings

.entry-content h2,
.entry-content h3 {
  margin-bottom: 1rem;
}

Control Paragraph Spacing Globally

.entry-content p {
  margin-top: 0;
  margin-bottom: 1rem;
}

Reduce the Gap Between Child Blocks (Block Gap)

If a Group or Columns block adds too much space between its children, target the block gap variable directly:

.wp-block-group.tight-group {
  --wp--style--block-gap: 0.75rem;
}

Add a One-Off Gap with Custom HTML

For a single visual gap where you do not want a Spacer block, a Custom HTML block works and stays accessible:

<div style="height:2rem" aria-hidden="true"></div>

Use this sparingly. For anything you will repeat, prefer Gutenberg spacing controls or a reusable CSS class so your layout stays maintainable.

Use HTML Entities Inside Text Only

HTML entities such as &nbsp; force a non-breaking space inside text, but they are not the right fix for layout spacing between blocks. Use them only for spacing inside a sentence or label, never to separate sections.

Word  Word
Pro tip: Always paste new CSS on a staging copy first. A rule like !important on a shared class can silently change spacing on dozens of pages. Test it in a sandbox, confirm the live layout, then sync it across with InstaWP.

Method 5: Set Global Spacing in theme.json (Site-Wide Fix)

If you keep fixing the same gap on page after page, stop treating it as a per-page problem. In block themes, theme.json is the single source of truth for global spacing, and setting it once fixes the whole site. This is the most scalable method for developers and agencies.

If your site runs on InstaWP, you can edit theme.json in the browser with the built-in Code Editor: open the site in your InstaWP dashboard and choose Code Editor from its tools.

InstaWP Sites list with Tools and Code Editor selected from the site actions menu

You have two options: VS Code Editor and WPCodeBox.

InstaWP Code Editor dialog offering VS Code and WPCodeBox

We’re opening the theme.json file using WPCodeBox, which opens the theme’s files in the browser. Go to wp-content/themes/, open your theme’s folder and select theme.json.

WPCodeBox file tree open on a theme's theme.json file

Before you change anything, read what your theme already sets. Twenty Twenty-Five 1.5, the default theme in WordPress 7.1, ships these values:

  • styles.spacing.blockGap: 1.2rem, the 19.2 px default gap between blocks.
  • settings.spacing.spacingSizes: seven presets from Tiny (10px) to XX-Large (clamp(70px, 10vw, 140px)), with defaultSpacingSizes set to false so only these appear in the editor.
  • Per-block overrides: Columns use the Regular preset (clamp(30px, 5vw, 50px)), Buttons use 16px, and Quote uses the X-Small preset (20px).

Define a clean spacing scale and the editor will offer those presets everywhere:

{
  "version": 3,
  "settings": {
    "spacing": {
      "blockGap": true,
      "units": [ "px", "em", "rem", "vh", "vw", "%" ],
      "spacingScale": {
        "steps": 7
      }
    }
  },
  "styles": {
    "spacing": {
      "blockGap": "1.5rem"
    }
  }
}

You can also create a child theme so your theme.json edits survive theme updates, then test the change on an InstaWP staging copy before it touches production. Because theme.json affects every page at once, staging-first is not optional here, it is the difference between a clean rollout and a site-wide spacing surprise.

Best Practices for WordPress Block Spacing

The best practice for WordPress block spacing is to set it once and override it rarely: define the default gap and presets in theme.json, use block margin or a parent’s Block spacing for exceptions, and keep Spacer blocks for one-off gaps. Use rem or preset values rather than fixed pixels so gaps shrink on phones, and test any site-wide change on a staging copy first.

Scenario Best fix Avoid
Need a quick visual gap Single Spacer block (rem units) Stacking multiple Spacer blocks
Remove space between two blocks Margin, padding, or block gap Random negative margins
Remove space between paragraphs Shift + Enter, paragraph spacing, theme CSS Killing readable rhythm everywhere
Fix space between columns Columns block gap + column padding Editing only one inner column
Need site-wide consistency theme.json, CSS classes, templates, snapshots Manual per-page fixes
Fix a live client site Staging + InstaWP Connect + 2-Way Sync Testing directly on production

For agencies and developers, the long-term win is not reducing one gap. It is building a spacing system: define section spacing, paragraph spacing, heading spacing, column gaps, and mobile behaviour once, save that layout as a reusable template or snapshot, and start every future project with clean spacing from day one.

Pair that with a staging-first habit and spacing stops being a recurring fire drill.

Final Thoughts

To add blank space between WordPress blocks, use the Spacer block for one-off gaps or Gutenberg’s margin, padding, and block gap controls for everything else. To remove blank space, work through the layers in order: Spacer blocks, margin, padding, block gap, then theme CSS or theme.json.

For consistency across a whole site, set the spacing scale once in theme.json. And for any production or client site, make the change on a staging copy first, optionally with an AI agent connected via InstaMCP, so you can test the layout before it ever reaches your visitors.

Fix WordPress spacing the safe way

Spin up a WordPress sandbox to test layout changes, or connect an existing site with InstaWP Connect and fix spacing in staging before syncing it live. Creating an account is free, and adding a card unlocks $25 in credits.

Get Started on InstaWP →

FAQs About WordPress Spacing Between Blocks

Which block adds a blank space between other blocks in WordPress?

The Spacer block adds blank space between other blocks in WordPress. Insert it between two blocks from the + menu, then set its height by dragging the handle or entering a value in the Dimensions panel. Use rem or em units so the gap scales on mobile, and avoid stacking multiple Spacer blocks.

How do I remove space between WordPress blocks?

Select the blocks above and below the gap and check their margin and padding under Dimensions, then check the parent block’s block gap. Delete any stray Spacer or empty Paragraph blocks using List View. If the editor shows no spacing but the live page does, the source is theme CSS or theme.json, which you can override with a targeted rule.

How do I remove space between paragraphs in WordPress?

Press Shift + Enter for a line break inside the same paragraph instead of Enter, which creates a new Paragraph block with its own margin. If gaps still look too large, reduce the paragraph block spacing under Dimensions, or lower the paragraph margin-bottom in your theme CSS. Reduce gradually so long-form text stays readable.

How do I change the space between columns in WordPress?

Select the parent Columns block (not a single column) and adjust its block gap to control horizontal spacing. Then check each individual Column block’s padding, especially for vertical gaps that appear only on mobile where columns stack. If the columns sit inside a Group, also check that Group’s padding.

What is the difference between padding, margin, and block gap in WordPress?

Margin is the space outside a block, padding is the space inside a block, and block gap is the space between child blocks inside a parent such as a Group or Columns block. Use margin to change the gap between two separate blocks, padding for breathing room inside a container, and block gap for evenly spaced children.

How do I set spacing for my whole WordPress site at once?

In a block theme, edit theme.json and set styles.spacing.blockGap to your preferred default, and define a spacingScale so the editor offers consistent presets everywhere. This applies site-wide, so use a child theme to survive updates and test the change on a staging copy before pushing it to production.

Can I use AI to fix WordPress spacing issues?

Yes. Every InstaWP site is MCP-ready with one toggle, so you can connect an AI client like Claude Desktop, Claude Code, Cursor or ChatGPT and ask it to find and fix the source of a spacing gap. The safe practice is to point the AI at a staging copy rather than your live site, review its proposed change, then sync the approved fix to production.

Should I fix WordPress spacing issues directly on a live site?

For a small personal site, simple edits are usually fine. For client, business, WooCommerce, or high-traffic sites, fix spacing on a staging copy first. With InstaWP Connect and 2-Way Sync you can create a staging site, test the layout on desktop and mobile, and push only the approved change back to production, so visitors never see a broken layout.

Why is there still a gap after I set the margin to 0?

You probably changed the wrong block. In block themes the default gap is the top margin of the lower block, so set the margin-top of the block below the gap to 0, or set the parent Group’s Block spacing to 0. On WordPress 7.1 with Twenty Twenty-Five, setting the upper block’s bottom margin to 0 left the full 19.2 px gap. If the gap survives both, the theme’s CSS is adding it.

What is the default space between blocks in WordPress?

It depends on the theme. Twenty Twenty-Five, the default theme in WordPress 7.1, sets block spacing to 1.2rem, which is 19.2 px between consecutive blocks, 16 px between buttons and 30 to 50 px between columns depending on screen width. Other block themes set their own value in theme.json under styles.spacing.blockGap.

NS
Neha Sharma
Content, InstaWP

Neha writes practical WordPress tutorials and agency playbooks, with a focus on dev workflows and AI building.

$750 of hosting credits for $499.Black Friday