Margin & padding: the creation of negative space

Julian Poplawski
UX Collective
Published in
2 min readOct 29, 2019

Negative space is an important element of design and is especially prominent in UI design that promotes readability by guiding the user through a page. The layout and composition of page are essentially made up of containers with content in them. Margin and padding makeup the negative space around content and are comprised in the following manner.

Padding is the space around the content and between the border.

Margin is the space on the outside of the border and determines the proximity to other elements.

CSS Box Model (a special Michelangelo edition)

In this diagram, also known as the CSS Box Model (a special Michelangelo edition…) you will also see space for content and a border.

Content is simply the bounds of an image or text

A border surrounds the padding and content. A padding and margin can still exist around content without a border.

Below is an example that shows the differences between padding and margin.

Padding vs. Margin

On the left there is padding around the text, with no margin. There is space around the content and the text wraps and extends downwards.

On the right there is a margin but no padding. The text is against the margin and the margin extends outwards defining how close the left element can be.

Here are some things to keep in mind. Margins allow us to define space between elements and padding allow us to define space inside an element. These differences are important to remember when laying out a design, as negative space will affect the composition of a design as well as where users focus throughout a page.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Written by Julian Poplawski

UX/UI Designer — love for resourcefulness, medicine, fashion and mythical creatures

No responses yet

Write a response