Spacer

Last updated

Spacer adds vertical space from a fixed set of sizes, so gaps match across the site. It can also use a smaller gap on phones, where desktop spacing feels too big.

Demonstration

Spacers are invisible, so the shading here is only for the demo. It comes from the Bootstrap classes bg-primary bg-opacity-25, added under Advanced → Additional CSS class(es).

Sizes

XS (8px)

Small (16px)

Medium (32px)

Large (48px)

XL (72px)

XXL (96px)

Custom, set to 40px

Smaller on phones

XL on desktop, Small below 768px

Content above

Content below

No space on phones

Large on desktop, None below 768px

Content above

Content below

As visitors see it

Medium, with no shading

Content above

Content below

Spacer Settings

Size: Options: XS (8px), Small (16px), Medium (32px), Large (48px), XL (72px), XXL (96px), Custom.

Custom Height: Height in pixels when Size is Custom. Default 40.

Mobile Size: Height below 768px.

Usage Notes

Spacing that scales: The preset sizes are set in rem, so they grow with the site’s base font size. The pixel values in the labels assume the usual 16px. Custom Height is a fixed number of pixels, so use a preset when you want gaps to match across the site.

On phones: Mobile Size applies below 768px. Use it to shrink a large gap on small screens, or choose None to remove the space on phones entirely.

Spacer or padding: For space around a whole section, use the Section block’s Vertical Padding. Use Spacer for a gap between blocks inside it, such as above a row of buttons or below a heading.

In the editor: The spacer shows as a striped box with a dashed outline, so you can find and select it even when it’s small. Visitors see only empty space, and screen readers skip it.

Outside the block editor: In classic content and widgets, use the shortcode [hdb_spacer size="lg" mobile="sm"]. Both size and mobile take the presets (none, xs, sm, md, lg, xl, xxl) or a pixel number such as 40. mobile also takes same, which is the default. Add class="…" for your own CSS classes.