How to Add Margin to a Section in Wix Studio

Spacing is one of those design details that separates a polished website from one that feels cramped or unbalanced. In Wix Studio, margins control the space outside a section — pushing it away from adjacent elements or the edges of the page. Getting this right affects both how your site looks and how it performs across different screen sizes.

What Margin Actually Does in Wix Studio

Before touching any settings, it helps to understand what you're adjusting. In web design, the box model describes how every element on a page is surrounded by layers:

  • Content — the actual text, image, or block
  • Padding — space inside the element, between content and border
  • Border — the visible or invisible edge
  • Margin — space outside the element, between it and neighboring sections

In Wix Studio, sections are the full-width horizontal containers that stack vertically to build your page. Adding margin to a section pushes it away from whatever is above or below it — or, in some cases, insets it from the sides of the viewport.

This is different from padding, which adds breathing room inside the section around its contents. Many designers mix these up, which leads to layouts that look off in ways that are hard to diagnose.

How to Add Margin to a Section in Wix Studio 🎯

Wix Studio gives you access to spacing controls through its Inspector panel — the properties sidebar that appears when you select an element on the canvas.

Here's the general process:

  1. Open your site in Wix Studio and enter the editor.
  2. Click the section you want to adjust. A blue outline will appear around it.
  3. Open the Inspector panel on the right side of the screen. If it isn't visible, look for the panel toggle in the top toolbar.
  4. Navigate to the Layout or Spacing section within the Inspector.
  5. Locate the margin fields — these are typically labeled with directional options: Top, Bottom, Left, and Right.
  6. Enter your desired margin value. Wix Studio accepts values in pixels (px), percentages (%), or viewport-relative units (vw/vh) depending on the control.
  7. Preview your changes using the responsive preview toggles at the top to check how the margin behaves on desktop, tablet, and mobile.

Wix Studio also supports CSS-style shorthand thinking — if you want equal margin on all sides, entering the same value for top, bottom, left, and right achieves that. Some controls may offer a link icon to lock all four values together.

Responsive Margins: The Variable That Changes Everything

One of Wix Studio's core strengths is its responsive design system, and margin behavior is tied directly to breakpoints. This is where things get more nuanced.

A margin that looks perfect on a 1440px desktop monitor may collapse awkwardly on a 390px mobile screen. Wix Studio lets you set different margin values per breakpoint:

  • Desktop
  • Tablet
  • Mobile

To adjust margins per breakpoint, switch between device modes using the responsive toolbar at the top of the editor. Any spacing changes you make in one breakpoint won't automatically apply to others — which is intentional, but also a common source of confusion for newer users.

Percentage-based margins scale relative to the parent container's width, making them naturally adaptive. Pixel-based margins are fixed, which gives you precision but requires manual adjustment at smaller breakpoints.

Section Margin vs. Section Padding: A Quick Reference

PropertyWhere It Adds SpaceAffects Background Color/Image?
MarginOutside the sectionNo — space is transparent
PaddingInside the sectionYes — background extends into it

This distinction matters when your section has a background color or image. If you want space between sections without revealing the section's background, use margin. If you want the background to extend into the spacing area, use padding.

Common Scenarios Where Margin Settings Differ

How you apply margins in Wix Studio will depend heavily on your layout goals:

  • Full-width sections with visual separation — A small top and bottom margin (e.g., 40–60px) creates visual breathing room between content blocks without breaking the full-width aesthetic.
  • Centered, contained layouts — Left and right margins (or auto-margins via CSS) can create the appearance of a contained column even within a full-width section, though this is more commonly handled with inner containers in Wix Studio.
  • Hero sections — These often require zero margin to bleed edge-to-edge, with spacing handled entirely through padding instead.
  • Card or grid sections — Margins between stacked sections help avoid visual clutter when multiple content blocks sit close together.

Using Custom CSS for Advanced Margin Control 🛠️

For users comfortable with code, Wix Studio's Developer Mode unlocks direct CSS access. You can target specific sections using their element IDs or class names and apply margin rules directly:

#section-id { margin-top: 80px; margin-bottom: 80px; } 

This approach offers more precision than the GUI controls, particularly when building complex multi-breakpoint layouts or working with dynamic content where visual spacing needs to adapt programmatically.

The Variables That Shape Your Decision

How you configure margins in Wix Studio isn't a one-size-fits-all answer. Several factors shift what works best:

  • Your layout structure — Whether sections are stacked, overlapping, or grid-based changes what margins accomplish.
  • Breakpoint targets — A site designed primarily for mobile users needs tighter, carefully tested margins at small screen widths.
  • Background treatments — Sections with distinct background colors need different margin logic than transparent or white sections.
  • Design system consistency — Sites using an 8px or 4px spacing grid benefit from margins that stick to those multiples for visual rhythm.
  • Content density — Text-heavy pages often need more vertical margin between sections than image-forward layouts.

The right margin values for your sections ultimately depend on what you're building, who's viewing it, and how your overall layout is structured — details that only your specific project can answer.