Free Website Folk Help Centre

Understanding Margin vs. Padding: Spacing Your Content Correctly

When you are editing a page in Elementor, you will often come across two settings called Margin and Padding.

Both control spacing, but they do different jobs.

Once you understand the difference, it becomes much easier to control the layout of your website without accidentally creating large gaps or squashing your content together.

The easiest way to remember it is:

Padding = space inside an element

Margin = space outside an element

What is Padding?

Padding controls the space inside an element.

Imagine you have a box containing some text.

Padding creates space between the text and the edge of the box.

For example:

┌─────────────────────────────┐

│                             │

│     Your heading here       │

│                             │

└─────────────────────────────┘

The empty space around the heading, but still inside the box, is the padding.

Padding is particularly useful when you want to give content some breathing room.

For example, if you have a coloured background behind a heading, you might add padding so the heading does not sit right against the edge.

What is Margin?

Margin controls the space outside an element.

Imagine you have two separate pieces of content:

[ Heading ]

      space

[ Paragraph ]

The space between the heading and paragraph can be controlled using margin.

Margin is useful when you want to create space between different elements on the page.

A simple way to remember the difference

Think of an element as a box.

Padding is the space inside the box.

Margin is the space around the outside of the box.

Or remember:

Padding pushes the content in. Margin pushes other elements away.

Where can I find Margin and Padding?

Open the page you want to edit in Elementor.

Select the section, container, column or widget you want to adjust.

Go to the Advanced tab in the Elementor editing panel.

You should see settings for:

  • Margin
  • Padding

You may also see other spacing and positioning options.

How to change Padding

Suppose you have a text box with a coloured background, but the text is too close to the edges.

Select the element and open:

Advanced > Padding

You can then increase the padding.

For example, adding more padding to the top and bottom can make the section feel more spacious.

The content remains in the same general area, but there is now more room around it.

How to change Margin

Now imagine that two sections of your page are sitting too close together.

You could select one of the elements and adjust its Margin.

Increasing the bottom margin, for example, can create more space before the next element.

This can help separate different pieces of content and make the page easier to read.

You can adjust each side separately

Elementor normally allows you to set different values for:

  • Top
  • Right
  • Bottom
  • Left

For example, you might want:

Top: 20
Right: 10
Bottom: 30
Left: 10

This gives you precise control over the spacing.

You may also see an option that links the four values together.

When the values are linked, changing one value can change all four sides.

If you want to control each side separately, make sure the values are unlinked.

Don’t add spacing everywhere

One common mistake when editing Elementor pages is adding margin and padding simply because the page does not look quite right.

Before changing anything, try to work out where the unwanted space is coming from.

For example:

  • Is there too much space inside the element? → Check Padding.
  • Is there too much space between two elements? → Check Margin.
  • Is the whole section too tall? → Check the section or container settings.
  • Is an image creating unexpected space? → Check the image and its surrounding layout.

Making random changes can make the layout harder to manage.

Margin vs Padding: an example

Imagine you have a button inside a coloured container.

You want the button to have more room around it.

You could increase the Padding on the container.

This creates more space inside the container.

Now imagine the button is too close to another section underneath it.

You might instead adjust the Margin to create more space between the button and the surrounding content.

The right choice depends on where you want the space to appear.

Be careful when changing existing designs

If your website has already been professionally designed, its spacing will probably have been set deliberately.

Before making large changes to margin or padding, consider whether the existing spacing is intentional.

A small adjustment may be all that is needed.

If you suddenly add a large amount of padding to a section, you could make the page unnecessarily long or push important content further down the screen.

Check mobile and tablet

This is particularly important when changing spacing.

A large amount of padding that looks fine on a desktop screen can take up a lot of space on a mobile phone.

After making changes, switch Elementor to its responsive views and check:

Desktop → Tablet → Mobile

If necessary, you can use different spacing values for different devices.

For example, you might want more generous spacing on desktop and slightly less on mobile.

Don’t use spacing to fix every problem

Sometimes a layout problem is not actually caused by margin or padding.

For example, if a heading is in the wrong position, the problem could be related to:

  • The section or container layout.
  • Column width.
  • Alignment.
  • An image size.
  • Another element affecting the layout.

Adding more margin may appear to fix the problem temporarily, but it can create problems elsewhere.

Try to understand the cause before changing the spacing.

A quick checklist

When adjusting spacing in Elementor, ask yourself:

Is the space inside the element?
→ Try Padding.

Is the space between this element and another element?
→ Try Margin.

Is the whole section too large?
→ Check the section or container settings.

Does it still look good on mobile?
→ Check the responsive views.

Keep it simple

You do not need to become an expert in web design to use margin and padding.

Just remember:

Padding = inside

Margin = outside

Make small changes, check the result and always look at the page on desktop, tablet and mobile.

If the spacing suddenly looks very different from the rest of your website, it is usually better to undo the change and submit a support ticket rather than continuing to adjust several settings at once.

Didn’t answer your question?

Our team are real people and happy to help. Send us a ticket and we'll get back to you.

Submit a Ticket